[dwgpio] Add driver for the DesignWare GPIO controller

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-08-05 13:55:23 +01:00
parent 90fe3a2924
commit 2e4e1f7e9e
6 changed files with 434 additions and 5 deletions

View File

@@ -77,9 +77,21 @@ static inline void * dt_get_drvdata ( struct dt_device *dt ) {
return dt->priv;
}
/**
* Get devicetree parent device
*
* @v dt Devicetree device
* @ret parent Parent devicetree device
*/
static inline struct dt_device * dt_parent ( struct dt_device *dt ) {
return container_of ( dt->dev.parent, struct dt_device, dev );
}
extern void * dt_ioremap ( struct dt_device *dt, unsigned int offset,
unsigned int index, size_t len );
extern int dt_probe_node ( struct device *parent, unsigned int offset );
extern void dt_remove_node ( struct device *parent );
extern int dt_probe_children ( struct dt_device *parent, unsigned int offset );
extern void dt_remove_children ( struct dt_device *parent );
#endif /* _IPXE_DEVTREE_H */

View File

@@ -239,6 +239,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_cgem ( ERRFILE_DRIVER | 0x00db0000 )
#define ERRFILE_dwmac ( ERRFILE_DRIVER | 0x00dc0000 )
#define ERRFILE_dwusb ( ERRFILE_DRIVER | 0x00dd0000 )
#define ERRFILE_dwgpio ( ERRFILE_DRIVER | 0x00de0000 )
#define ERRFILE_aoe ( ERRFILE_NET | 0x00000000 )
#define ERRFILE_arp ( ERRFILE_NET | 0x00010000 )