History log of /u-boot/drivers/mtd/nand/raw/vf610_nfc.c
Revision Date Author Comments
# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# d678a59d 18-May-2024 Tom Rini <trini@konsulko.com>

Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 6fa1cca7 01-May-2024 Tom Rini <trini@konsulko.com>

mtd: Remove <common.h> and add needed includes

Remove <common.h> from this driver directory and when needed
add missing include files directly.

Reviewed-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Tom Rini <trini@konsulko.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4e590945 12-Nov-2022 Tom Rini <trini@konsulko.com>

global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*

The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 4d540a3a 19-Aug-2021 Tom Rini <trini@konsulko.com>

nand: vf610_nfc: Do not abuse CONFIG namespace

This driver uses the CONFIG namespace to set the chips internal CONFIG
namespace related bits. However, CONFIG is reserved for the top-level
Kconfig based configuration system. Use CFG as the namespace here
instead to avoid pollution.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 65e25bea 28-Dec-2020 Simon Glass <sjg@chromium.org>

dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()

In the spirit of using the same base name for all of these related macros,
rename this to have the operation at the end. This is not widely used so
the impact is fairly small.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 41575d8e 03-Dec-2020 Simon Glass <sjg@chromium.org>

dm: treewide: Rename auto_alloc_size members to be shorter

This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.

Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.

Signed-off-by: Simon Glass <sjg@chromium.org>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 7f36806c 15-Sep-2020 Sean Anderson <seanga2@gmail.com>

nand: vybrid: Re-introduce vf610_nfc.dev

This member was presumably dropped when this driver was converted from
Linux. However, it is still used in log statements during initialization.
This patch adds the member back. In addition, allocation of struct
vf610_nfc has been moved to the callers of vf610_nfc_nand_init. This allows
it to be allocated by DM (if it is being used) and for dev to be
initialized.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# 336d4615 03-Feb-2020 Simon Glass <sjg@chromium.org>

dm: core: Create a new header file for 'compat' features

At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# acdf10e1 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Extend the vf610 NFC NAND driver to support device tree (and DM)

This commit adds support for device tree and enumeration via device model
for the Vybrid's NFC NAND driver.

Signed-off-by: Lukasz Majewski <lukma@denx.de>


# 254409db 03-Dec-2018 Lukasz Majewski <lukma@denx.de>

nand: vybrid: Use calloc() instead of malloc() to allocate struct nfc

Without this change it is possible that Vybrid's NFC driver malloc() call
will obtain some memory used (and correctly free'd) by some previous
driver (in this case pinctrl for Vybrid).

As a result some fields of struct nfc - in out case mtd->_get_device - are
"pre initialized" with some random values.

On the latter stage of booting, when e.g. somebody calls 'mtdparts default'
the "data abort" is observed when __get_mtd_device() function is called.

The mtd->_get_device pointer is not NULL and wrong value is referenced.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>


# a430fa06 16-Aug-2018 Miquel Raynal <miquel.raynal@bootlin.com>

mtd: move NAND files into a raw/ subdirectory

NAND flavors, like serial and parallel, have a lot in common and would
benefit to share code. Let's move raw (parallel) NAND specific code in a
raw/ subdirectory, to ease the addition of a core file in nand/ and the
introduction of a spi/ subdirectory specific to SPI NANDs.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>