[PATCH v3 1/2] gpio: add PolarFire SoC GPIO and Core GPIO driver

Tom Rini trini at konsulko.com
Thu Jul 24 20:54:07 CEST 2025


On Thu, Jul 17, 2025 at 01:38:43PM +0800, Leo Liang wrote:
> On Tue, Jul 08, 2025 at 06:31:20PM +0530, Eoin Dickson wrote:
> > From: Eoin Dickson <eoin.dickson at microchip.com>
> > 
> > This driver adds GPIO support for PolarFire SoC family, this is required
> > to add sd card support on the Beagle-V-Fire as it uses GPIO chip selects
> > 
> > Signed-off-by: Eoin Dickson <eoin.dickson at microchip.com>
> > ---
> >  drivers/gpio/Kconfig     |   5 +
> >  drivers/gpio/Makefile    |   1 +
> >  drivers/gpio/mpfs_gpio.c | 198 +++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 204 insertions(+)
> >  create mode 100644 drivers/gpio/mpfs_gpio.c
> 
> Acked-by: Leo Yu-Chi Liang <ycliang at andestech.com>

Nothing enables this driver today. Enabling it on sandbox gives:
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c: In function ‘mchp_gpio_probe’:
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:139:20: error: assignment to ‘const struct mpfs_gpio_reg_offsets *’ from ‘ulong’ {aka ‘long unsigned int’} makes pointer from integer without a cast [-Werror=int-conversion]
  139 |         plat->regs = dev_get_driver_data(dev);
      |                    ^
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c: At top level:
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:163:25: error: initialization of ‘long unsigned int’ from ‘const struct mpfs_gpio_reg_offsets *’ makes integer from pointer without a cast [-Werror=int-conversion]
  163 |                 .data = &mpfs_reg_offsets,
      |                         ^
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:163:25: note: (near initialization for ‘mchp_gpio_match[0].data’)
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:166:25: error: initialization of ‘long unsigned int’ from ‘const struct mpfs_gpio_reg_offsets *’ makes integer from pointer without a cast [-Werror=int-conversion]
  166 |                 .data = &coregpio_reg_offsets,
      |                         ^
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:166:25: note: (near initialization for ‘mchp_gpio_match[1].data’)
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:174:35: error: initialization of ‘int (*)(struct udevice *, unsigned int)’ from incompatible pointer type ‘_Bool (*)(struct udevice *, u32)’ {aka ‘_Bool (*)(struct udevice *, unsigned int)’} [-Werror=incompatible-pointer-types]
  174 |         .get_value              = mchp_gpio_get_value,
      |                                   ^~~~~~~~~~~~~~~~~~~
/home/trini/work/u-boot/u-boot/drivers/gpio/mpfs_gpio.c:174:35: note: (near initialization for ‘mchp_gpio_ops.get_value’)
cc1: all warnings being treated as errors

Please fix, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250724/6fe1ac0d/attachment.sig>


More information about the U-Boot mailing list