Lines Matching full:scheme
24 /* Select Scheme Value Register */
56 /* Scheme Registers bit field masks */
133 /* Scheme Configuration RAM Registers */
146 /* 0x140: KeyGen Scheme Entry Statistic Packet Counter */
147 u32 kgse_dv0; /* 0x144: KeyGen Scheme Entry Default Value 0 */
148 u32 kgse_dv1; /* 0x148: KeyGen Scheme Entry Default Value 1 */
150 /* 0x14C: KeyGen Scheme Entry Coarse Classification Bit*/
151 u32 kgse_mv; /* 0x150: KeyGen Scheme Entry Match vector */
152 u32 kgse_om; /* 0x154: KeyGen Scheme Entry Operation Mode bits */
154 /* 0x158: KeyGen Scheme Entry Virtual Storage Profile */
159 u32 fmkg_pe_sp; /* 0x100: KeyGen Port entry Scheme Partition */
176 u32 fmkg_seer; /* 0x01C: KeyGen Scheme Error Event Register */
177 u32 fmkg_seeer; /* 0x020: KeyGen Scheme Error Event Enable Register */
190 struct fman_kg_scheme_regs fmkg_sch; /* Scheme Registers */
196 /* KeyGen Scheme data */
198 bool used; /* Specifies if this scheme is used */
203 * so we have only one port id bound to a scheme
261 * Build Action Register value for scheme settings
263 * scheme_id: Scheme ID
264 * update_counter: update scheme counter
265 * write: true for action to write the scheme or false for read action
303 * Write Scheme Partition Register with specified value
306 * sp: Scheme Partition register value
307 * add: true to add a scheme partition or false to clear
364 * scheme_id: Scheme ID
365 * scheme_regs: Scheme registers values desired to be written
366 * update_counter: update scheme counter
377 /* Write indirect scheme registers */ in keygen_write_scheme()
411 * Find the first free scheme available to be used
414 * scheme_id: pointer to scheme id
433 * Provides the scheme for specified ID
436 * scheme_id: Scheme ID
438 * Return: handle to required scheme
453 * scheme_id: id of the scheme to bind to
463 struct keygen_scheme *scheme; in keygen_bind_port_to_schemes() local
468 scheme = get_scheme(keygen, scheme_id); in keygen_bind_port_to_schemes()
469 if (!scheme) { in keygen_bind_port_to_schemes()
470 pr_err("Requested Scheme does not exist\n"); in keygen_bind_port_to_schemes()
473 if (!scheme->used) { in keygen_bind_port_to_schemes()
474 pr_err("Cannot bind port to an invalid scheme\n"); in keygen_bind_port_to_schemes()
480 ar_reg = build_ar_bind_scheme(scheme->hw_port_id, false); in keygen_bind_port_to_schemes()
489 ar_reg = build_ar_bind_scheme(scheme->hw_port_id, true); in keygen_bind_port_to_schemes()
501 * Setup the scheme according to required configuration
504 * scheme_id: scheme ID
505 * enable: true to enable scheme or false to disable it
514 struct keygen_scheme *scheme; in keygen_scheme_setup() local
518 scheme = get_scheme(keygen, scheme_id); in keygen_scheme_setup()
519 if (!scheme) { in keygen_scheme_setup()
520 pr_err("Requested Scheme does not exist\n"); in keygen_scheme_setup()
523 if (enable && scheme->used) { in keygen_scheme_setup()
524 pr_err("The requested Scheme is already used\n"); in keygen_scheme_setup()
528 /* Clear scheme registers */ in keygen_scheme_setup()
531 /* Setup all scheme registers: */ in keygen_scheme_setup()
535 /* Enable Scheme */ in keygen_scheme_setup()
543 scheme_regs.kgse_mv = scheme->match_vector; in keygen_scheme_setup()
545 /* Scheme don't override StorageProfile: in keygen_scheme_setup()
552 if (scheme->use_hashing) { in keygen_scheme_setup()
571 tmp_reg |= ((scheme->hash_fqid_count - 1) << in keygen_scheme_setup()
573 tmp_reg |= scheme->hashShift << KG_SCH_HASH_CONFIG_SHIFT_SHIFT; in keygen_scheme_setup()
575 if (scheme->symmetric_hash) { in keygen_scheme_setup()
592 /* configure kgse_fqb: Scheme FQID base */ in keygen_scheme_setup()
594 tmp_reg |= scheme->base_fqid; in keygen_scheme_setup()
602 /* Write scheme registers */ in keygen_scheme_setup()
605 pr_err("Writing scheme registers failed\n"); in keygen_scheme_setup()
609 /* Update used field for Scheme */ in keygen_scheme_setup()
610 scheme->used = enable; in keygen_scheme_setup()
651 * so that all ports are not bound to any scheme/classification plan in keygen_init()
665 /* Enable all scheme interrupts */ in keygen_init()
691 struct keygen_scheme *scheme; in keygen_port_hashing_init() local
695 /* Validate Scheme configuration parameters */ in keygen_port_hashing_init()
705 /* Find a free scheme */ in keygen_port_hashing_init()
712 /* Create and configure Hard-Coded Scheme: */ in keygen_port_hashing_init()
714 scheme = get_scheme(keygen, scheme_id); in keygen_port_hashing_init()
715 if (!scheme) { in keygen_port_hashing_init()
716 pr_err("Requested Scheme does not exist\n"); in keygen_port_hashing_init()
719 if (scheme->used) { in keygen_port_hashing_init()
720 pr_err("The requested Scheme is already used\n"); in keygen_port_hashing_init()
724 /* Clear all scheme fields because the scheme may have been in keygen_port_hashing_init()
727 memset(scheme, 0, sizeof(struct keygen_scheme)); in keygen_port_hashing_init()
729 /* Setup scheme: */ in keygen_port_hashing_init()
730 scheme->hw_port_id = hw_port_id; in keygen_port_hashing_init()
731 scheme->use_hashing = true; in keygen_port_hashing_init()
732 scheme->base_fqid = hash_base_fqid; in keygen_port_hashing_init()
733 scheme->hash_fqid_count = hash_size; in keygen_port_hashing_init()
734 scheme->symmetric_hash = DEFAULT_SYMMETRIC_HASH; in keygen_port_hashing_init()
735 scheme->hashShift = DEFAULT_HASH_SHIFT; in keygen_port_hashing_init()
740 scheme->match_vector = 0; in keygen_port_hashing_init()
744 pr_err("Scheme setup failed\n"); in keygen_port_hashing_init()
748 /* Bind Rx port to Scheme */ in keygen_port_hashing_init()