Home | History | Annotate | Download | only in gpio

Lines Matching refs:regs

13 #include <asm/arch/imx-regs.h>
26 struct gpio_regs *regs;
30 struct gpio_regs *regs;
64 struct gpio_regs *regs;
72 regs = (struct gpio_regs *)gpio_ports[port];
74 l = readl(&regs->gpio_dir);
83 writel(l, &regs->gpio_dir);
91 struct gpio_regs *regs;
99 regs = (struct gpio_regs *)gpio_ports[port];
101 l = readl(&regs->gpio_dr);
106 writel(l, &regs->gpio_dr);
114 struct gpio_regs *regs;
122 regs = (struct gpio_regs *)gpio_ports[port];
124 val = (readl(&regs->gpio_psr) >> gpio) & 0x01;
160 static int mxc_gpio_is_output(struct gpio_regs *regs, int offset)
164 val = readl(&regs->gpio_dir);
169 static void mxc_gpio_bank_direction(struct gpio_regs *regs, int offset,
174 l = readl(&regs->gpio_dir);
183 writel(l, &regs->gpio_dir);
186 static void mxc_gpio_bank_set_value(struct gpio_regs *regs, int offset,
191 l = readl(&regs->gpio_dr);
196 writel(l, &regs->gpio_dr);
199 static int mxc_gpio_bank_get_value(struct gpio_regs *regs, int offset)
201 return (readl(&regs->gpio_psr) >> offset) & 0x01;
210 mxc_gpio_bank_direction(bank->regs, offset, MXC_GPIO_DIRECTION_IN);
222 mxc_gpio_bank_set_value(bank->regs, offset, value);
225 mxc_gpio_bank_direction(bank->regs, offset, MXC_GPIO_DIRECTION_OUT);
235 return mxc_gpio_bank_get_value(bank->regs, offset);
244 mxc_gpio_bank_set_value(bank->regs, offset, value);
254 if (mxc_gpio_is_output(bank->regs, offset))
283 bank->regs = plat->regs;
321 plat->regs = (struct gpio_regs *)addr;