mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 14:35:42 +08:00
Pinmux: Port to RTEMS
This commit is contained in:

committed by
Christian Mauderer

parent
e3bc24e616
commit
59ce99a357
@@ -54,6 +54,7 @@ RTEMS_BSD_DRIVER_SMC0(0x4e000000, RVPBXA9_IRQ_ETHERNET);
|
||||
RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
|
||||
SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
|
||||
SYSINIT_DRIVER_REFERENCE(ti_scm, simplebus);
|
||||
SYSINIT_DRIVER_REFERENCE(ti_pinmux, simplebus);
|
||||
SYSINIT_DRIVER_REFERENCE(am335x_prcm, simplebus);
|
||||
SYSINIT_DRIVER_REFERENCE(usbss, simplebus);
|
||||
SYSINIT_DRIVER_REFERENCE(musbotg, usbss);
|
||||
|
@@ -1226,6 +1226,10 @@
|
||||
#define fdt_immr_va _bsd_fdt_immr_va
|
||||
#define fdt_is_compatible_strict _bsd_fdt_is_compatible_strict
|
||||
#define fdt_parent_addr_cells _bsd_fdt_parent_addr_cells
|
||||
#define fdt_pinctrl_configure _bsd_fdt_pinctrl_configure
|
||||
#define fdt_pinctrl_configure_by_name _bsd_fdt_pinctrl_configure_by_name
|
||||
#define fdt_pinctrl_configure_tree _bsd_fdt_pinctrl_configure_tree
|
||||
#define fdt_pinctrl_register _bsd_fdt_pinctrl_register
|
||||
#define fdt_regsize _bsd_fdt_regsize
|
||||
#define fib4_free_nh_ext _bsd_fib4_free_nh_ext
|
||||
#define fib4_lookup_nh_basic _bsd_fib4_lookup_nh_basic
|
||||
@@ -4965,6 +4969,7 @@
|
||||
#define t_functions _bsd_t_functions
|
||||
#define t_functions_inited _bsd_t_functions_inited
|
||||
#define ti_am335x_clk_devmap _bsd_ti_am335x_clk_devmap
|
||||
#define ti_am335x_pinmux_dev _bsd_ti_am335x_pinmux_dev
|
||||
#define tick _bsd_tick
|
||||
#define ticket_altqs_active _bsd_ticket_altqs_active
|
||||
#define ticket_altqs_inactive _bsd_ticket_altqs_inactive
|
||||
@@ -4979,6 +4984,10 @@
|
||||
#define _timeout_task_init _bsd__timeout_task_init
|
||||
#define timevaladd _bsd_timevaladd
|
||||
#define timevalsub _bsd_timevalsub
|
||||
#define ti_pinmux_padconf_get _bsd_ti_pinmux_padconf_get
|
||||
#define ti_pinmux_padconf_get_gpiomode _bsd_ti_pinmux_padconf_get_gpiomode
|
||||
#define ti_pinmux_padconf_set _bsd_ti_pinmux_padconf_set
|
||||
#define ti_pinmux_padconf_set_gpiomode _bsd_ti_pinmux_padconf_set_gpiomode
|
||||
#define ti_prcm_clk_disable _bsd_ti_prcm_clk_disable
|
||||
#define ti_prcm_clk_enable _bsd_ti_prcm_clk_enable
|
||||
#define ti_prcm_clk_get_source_freq _bsd_ti_prcm_clk_get_source_freq
|
||||
|
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* This file is produced automatically.
|
||||
* Do not modify anything in here by hand.
|
||||
*
|
||||
* Created from source file
|
||||
* freebsd-org/sys/dev/fdt/fdt_pinctrl_if.m
|
||||
* with
|
||||
* makeobjops.awk
|
||||
*
|
||||
* See the source file for legal information
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _fdt_pinctrl_if_h_
|
||||
#define _fdt_pinctrl_if_h_
|
||||
|
||||
|
||||
#include <sys/tslog.h>
|
||||
|
||||
/** @brief Unique descriptor for the FDT_PINCTRL_CONFIGURE() method */
|
||||
extern struct kobjop_desc fdt_pinctrl_configure_desc;
|
||||
/** @brief A function implementing the FDT_PINCTRL_CONFIGURE() method */
|
||||
typedef int fdt_pinctrl_configure_t(device_t pinctrl, phandle_t cfgxref);
|
||||
|
||||
static __inline int FDT_PINCTRL_CONFIGURE(device_t pinctrl, phandle_t cfgxref)
|
||||
{
|
||||
kobjop_t _m;
|
||||
int rc;
|
||||
|
||||
TSENTER2(device_get_name(pinctrl));
|
||||
|
||||
KOBJOPLOOKUP(((kobj_t)pinctrl)->ops,fdt_pinctrl_configure);
|
||||
rc = ((fdt_pinctrl_configure_t *) _m)(pinctrl, cfgxref);
|
||||
|
||||
TSEXIT2(device_get_name(pinctrl));
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
#endif /* _fdt_pinctrl_if_h_ */
|
||||
|
27
rtemsbsd/local/fdt_pinctrl_if.c
Normal file
27
rtemsbsd/local/fdt_pinctrl_if.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <machine/rtems-bsd-kernel-space.h>
|
||||
|
||||
/*
|
||||
* This file is produced automatically.
|
||||
* Do not modify anything in here by hand.
|
||||
*
|
||||
* Created from source file
|
||||
* freebsd-org/sys/dev/fdt/fdt_pinctrl_if.m
|
||||
* with
|
||||
* makeobjops.awk
|
||||
*
|
||||
* See the source file for legal information
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kobj.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/bus.h>
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <rtems/bsd/local/fdt_pinctrl_if.h>
|
||||
|
||||
struct kobjop_desc fdt_pinctrl_configure_desc = {
|
||||
0, { &fdt_pinctrl_configure_desc, (kobjop_t)kobj_error_method }
|
||||
};
|
||||
|
Reference in New Issue
Block a user