Lines Matching defs:opcr
1357 static inline u32 get_opcr(__be32 opcr, u32 mask, u32 shift)
1359 return (be32_to_cpu(opcr) >> shift) & mask;
1362 static inline void set_opcr(__be32 *opcr, u32 value, u32 mask, u32 shift)
1364 *opcr &= ~cpu_to_be32(mask << shift);
1365 *opcr |= cpu_to_be32((value & mask) << shift);
1379 __be32 old_opcr, opcr[2];
1384 ret = cmp_read(fdtv, opcr_address, opcr);
1389 if (!get_opcr_online(*opcr)) {
1394 old_opcr = *opcr;
1396 if (get_opcr_p2p_connections(*opcr)) {
1397 if (get_opcr_channel(*opcr) != channel) {
1405 set_opcr_channel(opcr, channel);
1406 set_opcr_data_rate(opcr, 2); /* S400 */
1409 set_opcr_overhead_id(opcr, 0);
1414 set_opcr_p2p_connections(opcr, get_opcr_p2p_connections(*opcr) + 1);
1416 opcr[1] = *opcr;
1417 opcr[0] = old_opcr;
1419 ret = cmp_lock(fdtv, opcr_address, opcr);
1423 if (old_opcr != *opcr) {
1439 __be32 old_opcr, opcr[2];
1443 if (cmp_read(fdtv, opcr_address, opcr) < 0)
1447 if (!get_opcr_online(*opcr) || !get_opcr_p2p_connections(*opcr) ||
1448 get_opcr_channel(*opcr) != channel) {
1453 old_opcr = *opcr;
1454 set_opcr_p2p_connections(opcr, get_opcr_p2p_connections(*opcr) - 1);
1456 opcr[1] = *opcr;
1457 opcr[0] = old_opcr;
1459 if (cmp_lock(fdtv, opcr_address, opcr) < 0)
1462 if (old_opcr != *opcr) {