Lines Matching refs:per
264 static void portmux_setup(unsigned short per)
267 u16 function = P_FUNCT2MUX(per);
270 if (port_mux_lut[y].res == per) {
288 inline void portmux_setup(unsigned short per)
291 u16 ident = P_IDENT(per);
292 u16 function = P_FUNCT2MUX(per);
302 inline u16 get_portmux(unsigned short per)
305 u16 ident = P_IDENT(per);
312 inline void portmux_setup(unsigned short per)
314 u16 pmux, ident = P_IDENT(per), function = P_FUNCT2MUX(per);
665 * per Peripheral Identifier
675 int peripheral_request(unsigned short per, const char *label)
678 unsigned short ident = P_IDENT(per);
684 if (per & P_DONTCARE)
687 if (!(per & P_DEFINED))
715 if (!((per & P_MAYSHARE) && get_portmux(per) == P_FUNCT2MUX(per))) {
717 if (!(per & P_MAYSHARE)) {
731 __func__, ident, P_FUNCT2MUX(per), get_label(ident));
740 portmux_setup(per);
750 int peripheral_request_list(const unsigned short per[], const char *label)
755 for (cnt = 0; per[cnt] != 0; cnt++) {
757 ret = peripheral_request(per[cnt], label);
761 peripheral_free(per[cnt - 1]);
771 void peripheral_free(unsigned short per)
774 unsigned short ident = P_IDENT(per);
776 if (per & P_DONTCARE)
779 if (!(per & P_DEFINED))
789 if (!(per & P_MAYSHARE))
800 void peripheral_free_list(const unsigned short per[])
803 for (cnt = 0; per[cnt] != 0; cnt++)
804 peripheral_free(per[cnt]);