@@ -388,17 +388,17 @@ static int vbus_is_present(struct usba_udc *udc)
388388
389389static void toggle_bias (struct usba_udc * udc , int is_on )
390390{
391- if (udc -> errata && udc -> errata -> toggle_bias )
392- udc -> errata -> toggle_bias (udc , is_on );
391+ if (udc -> caps && udc -> caps -> toggle_bias )
392+ udc -> caps -> toggle_bias (udc , is_on );
393393}
394394
395395static void generate_bias_pulse (struct usba_udc * udc )
396396{
397397 if (!udc -> bias_pulse_needed )
398398 return ;
399399
400- if (udc -> errata && udc -> errata -> pulse_bias )
401- udc -> errata -> pulse_bias (udc );
400+ if (udc -> caps && udc -> caps -> pulse_bias )
401+ udc -> caps -> pulse_bias (udc );
402402
403403 udc -> bias_pulse_needed = false;
404404}
@@ -2031,17 +2031,17 @@ static void at91sam9g45_pulse_bias(struct usba_udc *udc)
20312031 AT91_PMC_BIASEN );
20322032}
20332033
2034- static const struct usba_udc_errata at91sam9rl_errata = {
2034+ static const struct usba_udc_caps at91sam9rl_caps = {
20352035 .toggle_bias = at91sam9rl_toggle_bias ,
20362036};
20372037
2038- static const struct usba_udc_errata at91sam9g45_errata = {
2038+ static const struct usba_udc_caps at91sam9g45_caps = {
20392039 .pulse_bias = at91sam9g45_pulse_bias ,
20402040};
20412041
20422042static const struct of_device_id atmel_udc_dt_ids [] = {
2043- { .compatible = "atmel,at91sam9rl-udc" , .data = & at91sam9rl_errata },
2044- { .compatible = "atmel,at91sam9g45-udc" , .data = & at91sam9g45_errata },
2043+ { .compatible = "atmel,at91sam9rl-udc" , .data = & at91sam9rl_caps },
2044+ { .compatible = "atmel,at91sam9g45-udc" , .data = & at91sam9g45_caps },
20452045 { .compatible = "atmel,sama5d3-udc" },
20462046 { /* sentinel */ }
20472047};
@@ -2052,7 +2052,6 @@ static const struct of_device_id atmel_pmc_dt_ids[] = {
20522052 { .compatible = "atmel,at91sam9g45-pmc" },
20532053 { .compatible = "atmel,at91sam9rl-pmc" },
20542054 { .compatible = "atmel,at91sam9x5-pmc" },
2055- { .compatible = "microchip,sam9x60-pmc" },
20562055 { /* sentinel */ }
20572056};
20582057
@@ -2070,8 +2069,8 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
20702069 if (!match )
20712070 return ERR_PTR (- EINVAL );
20722071
2073- udc -> errata = match -> data ;
2074- if (udc -> errata ) {
2072+ udc -> caps = match -> data ;
2073+ if (udc -> caps && ( udc -> caps -> pulse_bias || udc -> caps -> toggle_bias ) ) {
20752074 pp = of_find_matching_node_and_match (NULL , atmel_pmc_dt_ids ,
20762075 NULL );
20772076 if (!pp )
0 commit comments