Lines Matching defs:opcr
1359 static inline u32 get_opcr(__be32 opcr, u32 mask, u32 shift)
1361 return (be32_to_cpu(opcr) >> shift) & mask;
1364 static inline void set_opcr(__be32 *opcr, u32 value, u32 mask, u32 shift)
1366 *opcr &= ~cpu_to_be32(mask << shift);
1367 *opcr |= cpu_to_be32((value & mask) << shift);
1381 __be32 old_opcr, opcr[2];
1386 ret = cmp_read(fdtv, opcr_address, opcr);
1391 if (!get_opcr_online(*opcr)) {
1396 old_opcr = *opcr;
1398 if (get_opcr_p2p_connections(*opcr)) {
1399 if (get_opcr_channel(*opcr) != channel) {
1407 set_opcr_channel(opcr, channel);
1408 set_opcr_data_rate(opcr, 2); /* S400 */
1411 set_opcr_overhead_id(opcr, 0);
1416 set_opcr_p2p_connections(opcr, get_opcr_p2p_connections(*opcr) + 1);
1418 opcr[1] = *opcr;
1419 opcr[0] = old_opcr;
1421 ret = cmp_lock(fdtv, opcr_address, opcr);
1425 if (old_opcr != *opcr) {
1441 __be32 old_opcr, opcr[2];
1445 if (cmp_read(fdtv, opcr_address, opcr) < 0)
1449 if (!get_opcr_online(*opcr) || !get_opcr_p2p_connections(*opcr) ||
1450 get_opcr_channel(*opcr) != channel) {
1455 old_opcr = *opcr;
1456 set_opcr_p2p_connections(opcr, get_opcr_p2p_connections(*opcr) - 1);
1458 opcr[1] = *opcr;
1459 opcr[0] = old_opcr;
1461 if (cmp_lock(fdtv, opcr_address, opcr) < 0)
1464 if (old_opcr != *opcr) {