Lines Matching +full:gpio +full:- +full:reset
1 // SPDX-License-Identifier: GPL-2.0+
16 #include <asm/gpio.h>
35 &gpmc_cfg->cs[cs], base_addr, GPMC_SIZE_16M); in cl_omap3_smc911x_setup_net_chip_gmpc()
38 writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe); in cl_omap3_smc911x_setup_net_chip_gmpc()
41 writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe); in cl_omap3_smc911x_setup_net_chip_gmpc()
44 writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00, in cl_omap3_smc911x_setup_net_chip_gmpc()
45 &ctrl_base->gpmc_nadv_ale); in cl_omap3_smc911x_setup_net_chip_gmpc()
49 static int cl_omap3_smc911x_reset_net_chip(int gpio) in cl_omap3_smc911x_reset_net_chip() argument
53 if (!gpio_is_valid(gpio)) in cl_omap3_smc911x_reset_net_chip()
54 return -EINVAL; in cl_omap3_smc911x_reset_net_chip()
56 err = gpio_request(gpio, "eth rst"); in cl_omap3_smc911x_reset_net_chip()
60 /* Set gpio as output and send a pulse */ in cl_omap3_smc911x_reset_net_chip()
61 gpio_direction_output(gpio, 1); in cl_omap3_smc911x_reset_net_chip()
63 gpio_set_value(gpio, 0); in cl_omap3_smc911x_reset_net_chip()
65 gpio_set_value(gpio, 1); in cl_omap3_smc911x_reset_net_chip()
71 static inline int cl_omap3_smc911x_reset_net_chip(int gpio) { return 0; } in cl_omap3_smc911x_reset_net_chip() argument
75 int (*reset)(int), int rst_gpio) in cl_omap3_smc911x_init()
81 if (reset) in cl_omap3_smc911x_init()
82 reset(rst_gpio); in cl_omap3_smc911x_init()