Re: [U-Boot] [RFC PATCH v2 0/13] Enable driver model for GPIOs on Tegra

2014-05-09 Thread Simon Glass
Hi,

On 9 May 2014 11:28, Simon Glass  wrote:
> Now that driver model is part of U-Boot, the task of converting drivers over
> to it begins. GPIO is one of the easiest to convert, since it already has a
> sandbox driver and a uclass driver.
>
> The Tegra GPIO driver is relatively simple since it has a linear numbering
> and already uses the generic GPIO framework.
>
> Along the way some minor deficiencies were found with driver model - these
> are corrected in this series.
>
> Also it was difficult to exhaustively test the new driver against the old,
> so a new 'iotrace' framework was created to make this easier for future
> driver authors.
>
> This series has been tested on Trimslice (Tegra 20). I will try it on a
> beaver also.

One little update - region size increases:

$ ./tools/buildman/buildman -b us-gpio6  -sS seaboard
...
13: tegra: Enable driver model
   arm: (for 1/1 boards)  all +5088.0  bss -4.0  data +182.0
rodata +766.0  spl/u-boot-spl:all +16.0  spl/u-boot-spl:data +16.0
text +4144.0
14: tegra: Convert tegra GPIO driver to use driver model
   arm: (for 1/1 boards)  all -1422.0  bss -4480.0  data +88.0
rodata +330.0  spl/u-boot-spl:all +32.0  spl/u-boot-spl:text +32.0
text +2640.0

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC PATCH v2 0/13] Enable driver model for GPIOs on Tegra

2014-05-09 Thread Simon Glass
Now that driver model is part of U-Boot, the task of converting drivers over
to it begins. GPIO is one of the easiest to convert, since it already has a
sandbox driver and a uclass driver.

The Tegra GPIO driver is relatively simple since it has a linear numbering
and already uses the generic GPIO framework.

Along the way some minor deficiencies were found with driver model - these
are corrected in this series.

Also it was difficult to exhaustively test the new driver against the old,
so a new 'iotrace' framework was created to make this easier for future
driver authors.

This series has been tested on Trimslice (Tegra 20). I will try it on a
beaver also.

Changes in v3:
- Remove use of bool in header file to avoid exynos5 build failure
- Create a symlink for each arch to dt-bindings
- Bring in GPIO bindings for tegra{30,114,124} also
- Fix typo in commit subject
- Enable dm command in this patch instead of the next
- Move dm command enable to previous patch
- Use gpio number for the internal helper functions

Changes in v2:
- Add a new patch for an I/O tracing feature
- Add a new patch to enable iotrace for arm
- Add a new patch to enable iotrace for sandbox
- Add new patch to support include files for .dts files
- Add new patch to bring in Tegra device tree files from linux
- Update README to encourage conversion to driver model
- Add new patch to use case-insensitive comparison for GPIO banks
- Add new patch to add missing header files in lists and root
- Add new patch to deal with const-ness of the global_data pointer
- Add new patch to allow driver model tests only for sandbox
- Add new patch to fix printf() strings in the 'dm' command
- Split out a separate patch to enable driver model for tegra
- Split out driver model changes into separate patches
- Correct bugs found during testing

Simon Glass (13):
  Add an I/O tracing feature
  arm: Support iotrace feature
  sandbox: Support iotrace feature
  Makefile: Support include files for .dts files
  tegra: dts: Bring in GPIO bindings from linux
  dm: Update README to encourage conversion to driver model
  dm: Use case-insensitive comparison for GPIO banks
  dm: Add missing header files in lists and root
  dm: Cast away the const-ness of the global_data pointer
  dm: Allow driver model tests only for sandbox
  dm: Fix printf() strings in the 'dm' command
  tegra: Enable driver model
  tegra: Convert tegra GPIO driver to use driver model

 README |  28 ++
 arch/arm/dts/include/dt-bindings   |   1 +
 arch/arm/dts/tegra114.dtsi |  21 +-
 arch/arm/dts/tegra124.dtsi |  23 +-
 arch/arm/dts/tegra20.dtsi  |  15 +-
 arch/arm/dts/tegra30.dtsi  |  21 +-
 arch/arm/include/asm/arch-tegra/gpio.h |  14 +-
 arch/arm/include/asm/io.h  |   3 +
 arch/microblaze/dts/include/dt-bindings|   1 +
 arch/sandbox/dts/include/dt-bindings   |   1 +
 arch/sandbox/include/asm/io.h  |  10 +
 arch/x86/dts/include/dt-bindings   |   1 +
 board/nvidia/seaboard/seaboard.c   |   2 +-
 common/Makefile|   2 +
 common/cmd_iotrace.c   |  73 +
 common/iotrace.c   | 169 +++
 drivers/core/lists.c   |   1 +
 drivers/core/root.c|   7 +-
 drivers/core/uclass.c  |   2 +-
 drivers/gpio/gpio-uclass.c |   2 +-
 drivers/gpio/tegra_gpio.c  | 313 +
 include/configs/sandbox.h  |   3 +
 include/configs/tegra-common.h |   4 +
 include/dm/device-internal.h   |   4 +
 include/dt-bindings/gpio/gpio.h|  15 +
 include/dt-bindings/gpio/tegra-gpio.h  |  51 
 include/dt-bindings/interrupt-controller/arm-gic.h |  22 ++
 include/dt-bindings/interrupt-controller/irq.h |  19 ++
 include/iotrace.h  | 104 +++
 scripts/Makefile.lib   |   1 +
 test/dm/Makefile   |   2 +
 test/dm/cmd_dm.c   |  19 +-
 32 files changed, 849 insertions(+), 105 deletions(-)
 create mode 12 arch/arm/dts/include/dt-bindings
 create mode 12 arch/microblaze/dts/include/dt-bindings
 create mode 12 arch/sandbox/dts/include/dt-bindings
 create mode 12 arch/x86/dts/include/dt-bindings
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode 100644 include/dt-bindings/interrupt-controller/arm-gic.h
 create mode 100644 include/dt-bindings/interrupt-c

[U-Boot] [RFC PATCH v2 0/13] Enable driver model for GPIOs on Tegra

2014-05-05 Thread Simon Glass
Now that driver model is part of U-Boot, the task of converting drivers over
to it begins. GPIO is one of the easiest to convert, since it already has a
sandbox driver and a uclass driver.

The Tegra GPIO driver is relatively simple since it has a linear numbering
and already uses the generic GPIO framework.

Along the way some minor deficiencies were found with driver model - these
are corrected in this series.

Also it was difficult to exhaustively test the new driver against the old,
so a new 'iotrace' framework was created to make this easier for future
driver authors.

This series has been tested on Trimslice (Tegra 20). I will try it on a
beaver also.

Changes in v2:
- Add a new patch for an I/O tracing feature
- Add a new patch to enable iotrace for arm
- Add a new patch to enable iotrace for sandbox
- Add new patch to support include files for .dts files
- Add new patch to bring in Tegra device tree files from linux
- Update README to encourage conversion to driver model
- Add new patch to use case-insensitive comparison for GPIO banks
- Add new patch to add missing header files in lists and root
- Add new patch to deal with const-ness of the global_data pointer
- Add new patch to allow driver model tests only for sandbox
- Add new patch to fix printf() strings in the 'dm' command
- Split out a separate patch to enable driver model for tegra
- Split out driver model changes into separate patches
- Correct bugs found during testing

Simon Glass (13):
  Add an I/O tracing feature
  arm: Support iotrace feature
  sandbox: Support iotrace feature
  Makefile: Support include files for .dts files
  tegra: dts: Bring in GPIO bindings from linux
  dm: Update README to encourage conversion to driver model
  dm: Use case-insensitive comparison for GPIO banks
  dm: Add missing header files in lists and root
  dm: Case away the const-ness of the global_data pointer
  dm: Allow driver model tests only for sandbox
  dm: Fix printf() strings in the 'dm' command
  tegra: Enable driver model
  tegra: Convert tegra GPIO driver to use driver model

 README |  28 ++
 arch/arm/dts/tegra20.dtsi  |  15 +-
 arch/arm/include/asm/arch-tegra/gpio.h |  14 +-
 arch/arm/include/asm/io.h  |   3 +
 arch/sandbox/include/asm/io.h  |  10 +
 board/nvidia/seaboard/seaboard.c   |   2 +-
 common/Makefile|   2 +
 common/cmd_iotrace.c   |  73 
 common/iotrace.c   | 169 +
 drivers/core/lists.c   |   1 +
 drivers/core/root.c|   7 +-
 drivers/core/uclass.c  |   2 +-
 drivers/gpio/gpio-uclass.c |   2 +-
 drivers/gpio/tegra_gpio.c  | 393 -
 include/configs/sandbox.h  |   3 +
 include/configs/tegra-common.h |   4 +
 include/dm/device-internal.h   |   4 +
 include/dt-bindings/gpio/gpio.h|  15 +
 include/dt-bindings/gpio/tegra-gpio.h  |  51 +++
 include/dt-bindings/interrupt-controller/arm-gic.h |  22 ++
 include/dt-bindings/interrupt-controller/irq.h |  19 +
 include/iotrace.h  | 102 ++
 scripts/Makefile.lib   |   1 +
 test/dm/Makefile   |   2 +
 test/dm/cmd_dm.c   |  19 +-
 25 files changed, 848 insertions(+), 115 deletions(-)
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode 100644 include/dt-bindings/interrupt-controller/arm-gic.h
 create mode 100644 include/dt-bindings/interrupt-controller/irq.h
 create mode 100644 include/iotrace.h

-- 
1.9.1.423.g4596e3a

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot