From: Mario Six <mario.six@gdsys.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/3] drivers: Add board uclass
Date: Tue, 31 Jul 2018 11:38:46 +0200 [thread overview]
Message-ID: <CAN1kZormqsrBB6D2gwuAhGsD4utm1rJGa7SmOWO=eGPpJ9_Raw@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ0QXQ9Vi7h_QwzEBGKbc1oBSH+ozhU7uqrL5sJOXzLD1g@mail.gmail.com>
Hi Simon,
On Wed, Jun 27, 2018 at 11:03 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Mario,
>
> On 27 June 2018 at 00:03, Mario Six <mario.six@gdsys.cc> wrote:
>>
>> Since there is no canonical "board device" that can be used in board
>> files, it is difficult to use DM function for board initialization in
>> these cases.
>>
>> Hence, add a uclass that implements a simple "board device", which can
>> hold devices not suitable anywhere else in the device tree, and is also
>> able to read encoded information, e.g. hard-wired GPIOs on a GPIO
>> expander, read-only memory ICs, etc. that carry information about the
>> hardware.
>>
>> The devices of this uclass expose methods to read generic data types
>> (integers, strings, booleans) to encode the information provided by the
>> hardware.
>>
>> Signed-off-by: Mario Six <mario.six@gdsys.cc>
>>
>> ---
>>
>> v2 -> v3:
>> * Expanded comment on detect()
>> * Added error handling in example
>> * Renamed get_board() to board_get()
>> * Fixed style violations
>> * Documented board_get
>> * Made comments conform with kernel-doc
>> * Fixed SPDC-License-Identifier position
>>
>> v1 -> v2:
>> * Corrected description of dev parameter of devinfo_detect
>> * Added size parameter to devinfo_get_str
>> * Expanded uclass documentation
>> * Added function to get devinfo instance
>> * Renamed the uclass from devinfo to board
>>
>> ---
>> drivers/Kconfig | 2 +
>> drivers/Makefile | 1 +
>> drivers/board/Kconfig | 17 ++++++
>> drivers/board/Makefile | 6 ++
>> drivers/board/board-uclass.c | 60 +++++++++++++++++++
>> include/board.h | 139 +++++++++++++++++++++++++++++++++++++++++++
>> include/dm/uclass-id.h | 1 +
>> 7 files changed, 226 insertions(+)
>> create mode 100644 drivers/board/Kconfig
>> create mode 100644 drivers/board/Makefile
>> create mode 100644 drivers/board/board-uclass.c
>> create mode 100644 include/board.h
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> But please see below.
>
>>
>> diff --git a/drivers/Kconfig b/drivers/Kconfig
>> index 9e21b28750..48f7302506 100644
>> --- a/drivers/Kconfig
>> +++ b/drivers/Kconfig
>> @@ -22,6 +22,8 @@ source "drivers/ddr/Kconfig"
>>
>> source "drivers/demo/Kconfig"
>>
>> +source "drivers/board/Kconfig"
>> +
>> source "drivers/ddr/fsl/Kconfig"
>>
>> source "drivers/dfu/Kconfig"
>> diff --git a/drivers/Makefile b/drivers/Makefile
>> index a213ea9671..c2a363a66f 100644
>> --- a/drivers/Makefile
>> +++ b/drivers/Makefile
>> @@ -68,6 +68,7 @@ obj-y += ata/
>> obj-$(CONFIG_DM_DEMO) += demo/
>> obj-$(CONFIG_BIOSEMU) += bios_emulator/
>> obj-y += block/
>> +obj-y += board/
>> obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/
>> obj-$(CONFIG_CPU) += cpu/
>> obj-y += crypto/
>> diff --git a/drivers/board/Kconfig b/drivers/board/Kconfig
>> new file mode 100644
>> index 0000000000..cc1cf27205
>> --- /dev/null
>> +++ b/drivers/board/Kconfig
>> @@ -0,0 +1,17 @@
>> +menuconfig BOARD
>> + bool "Device Information"
>> + help
>> + Support methods to query hardware configurations from internal
>> + mechanisms (e.g. reading GPIO values, determining the presence of
>> + devices on busses, etc.). This enables the usage of U-Boot with
>> + modular board architectures.
>> +
>> +if BOARD
>> +
>> +
>> +config BOARD_GAZERBEAM
>> + bool "Enable device information for the Gazerbeam board"
>> + help
>> + Support querying device information for the gdsys Gazerbeam board.
>> +
>
> This should go in your board-specific patch, not the uclass.
> [..]
>
Indeed, that should be in the other patch.
Will be fixed in v4.
> Regards,
> Simon
Best regards,
Mario
prev parent reply other threads:[~2018-07-31 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 7:03 [U-Boot] [PATCH v3 1/3] drivers: Add board uclass Mario Six
2018-06-27 7:03 ` [U-Boot] [PATCH v3 2/3] board: Add gazerbeam driver Mario Six
2018-06-27 7:03 ` [U-Boot] [PATCH v3 3/3] test: Add tests for board uclass Mario Six
2018-06-27 21:03 ` [U-Boot] [PATCH v3 1/3] drivers: Add " Simon Glass
2018-07-31 9:38 ` Mario Six [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN1kZormqsrBB6D2gwuAhGsD4utm1rJGa7SmOWO=eGPpJ9_Raw@mail.gmail.com' \
--to=mario.six@gdsys.cc \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.