Lines Matching refs:data
47 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_get_val() local
49 if (data->little_endian) in mpc8xxx_gpio_get_val()
50 return in_le32(&data->base->gpdat) & mask; in mpc8xxx_gpio_get_val()
52 return in_be32(&data->base->gpdat) & mask; in mpc8xxx_gpio_get_val()
57 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_get_dir() local
59 if (data->little_endian) in mpc8xxx_gpio_get_dir()
60 return in_le32(&data->base->gpdir) & mask; in mpc8xxx_gpio_get_dir()
62 return in_be32(&data->base->gpdir) & mask; in mpc8xxx_gpio_get_dir()
67 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_open_drain_val() local
69 if (data->little_endian) in mpc8xxx_gpio_open_drain_val()
70 return in_le32(&data->base->gpodr) & mask; in mpc8xxx_gpio_open_drain_val()
72 return in_be32(&data->base->gpodr) & mask; in mpc8xxx_gpio_open_drain_val()
78 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_open_drain_on() local
80 if (data->little_endian) in mpc8xxx_gpio_open_drain_on()
81 setbits_le32(&data->base->gpodr, gpios); in mpc8xxx_gpio_open_drain_on()
83 setbits_be32(&data->base->gpodr, gpios); in mpc8xxx_gpio_open_drain_on()
89 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_open_drain_off() local
91 if (data->little_endian) in mpc8xxx_gpio_open_drain_off()
92 clrbits_le32(&data->base->gpodr, gpios); in mpc8xxx_gpio_open_drain_off()
94 clrbits_be32(&data->base->gpodr, gpios); in mpc8xxx_gpio_open_drain_off()
99 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_direction_input() local
103 if (data->little_endian) in mpc8xxx_gpio_direction_input()
104 clrbits_le32(&data->base->gpdir, mask); in mpc8xxx_gpio_direction_input()
106 clrbits_be32(&data->base->gpdir, mask); in mpc8xxx_gpio_direction_input()
113 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_set_value() local
114 struct ccsr_gpio *base = data->base; in mpc8xxx_gpio_set_value()
119 data->dat_shadow |= mask; in mpc8xxx_gpio_set_value()
121 data->dat_shadow &= ~mask; in mpc8xxx_gpio_set_value()
124 if (data->little_endian) in mpc8xxx_gpio_set_value()
131 if (data->little_endian) { in mpc8xxx_gpio_set_value()
132 out_le32(&base->gpdat, gpdir & data->dat_shadow); in mpc8xxx_gpio_set_value()
135 out_be32(&base->gpdat, gpdir & data->dat_shadow); in mpc8xxx_gpio_set_value()
145 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_direction_output() local
148 if (data->type == MPC5121_GPIO_TYPE && gpio >= 28) in mpc8xxx_gpio_direction_output()
156 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_get_value() local
160 return !!(data->dat_shadow & gpio_mask(gpio)); in mpc8xxx_gpio_get_value()
179 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_of_to_plat() local
182 data->little_endian = true; in mpc8xxx_gpio_of_to_plat()
218 struct mpc8xxx_gpio_data *data = dev_get_priv(dev); in mpc8xxx_gpio_probe() local
224 (unsigned long long)data->addr); in mpc8xxx_gpio_probe()
231 if (data->little_endian) in mpc8xxx_gpio_probe()
232 out_le32(&data->base->gpibe, 0xffffffff); in mpc8xxx_gpio_probe()
234 out_be32(&data->base->gpibe, 0xffffffff); in mpc8xxx_gpio_probe()
238 uc_priv->gpio_count = data->gpio_count; in mpc8xxx_gpio_probe()
252 { .compatible = "fsl,pq3-gpio", .data = MPC8XXX_GPIO_TYPE },
253 { .compatible = "fsl,mpc8308-gpio", .data = MPC8XXX_GPIO_TYPE },
254 { .compatible = "fsl,mpc8349-gpio", .data = MPC8XXX_GPIO_TYPE },
255 { .compatible = "fsl,mpc8572-gpio", .data = MPC8XXX_GPIO_TYPE},
256 { .compatible = "fsl,mpc8610-gpio", .data = MPC8XXX_GPIO_TYPE},
257 { .compatible = "fsl,mpc5121-gpio", .data = MPC5121_GPIO_TYPE, },
258 { .compatible = "fsl,qoriq-gpio", .data = MPC8XXX_GPIO_TYPE },