[U-Boot] [PATCH] pci: mx6: Implement reset callback

Stefano Babic sbabic at denx.de
Mon Feb 3 12:56:04 CET 2014


Hi Marek,

sorry for late answer.

On 28/01/2014 20:32, Marek Vasut wrote:
> On Tuesday, January 28, 2014 at 04:06:12 PM, Stefano Babic wrote:
>> Hi Marek,
>>
>> On 24/01/2014 16:25, Marek Vasut wrote:
>>> Add a callback so that a board can implement it's own specific routine to
>>> toggle the port's nRESET line.
>>>
>>> Signed-off-by: Marek Vasut <marex at denx.de>
>>> Cc: Stefano Babic <sbabic at denx.de>
>>> ---
>>>
>>>  drivers/pci/pcie_imx.c | 12 +++++++++---
>>>  1 file changed, 9 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
>>> index 0a74867..b554075 100644
>>> --- a/drivers/pci/pcie_imx.c
>>> +++ b/drivers/pci/pcie_imx.c
>>> @@ -450,6 +450,13 @@ static int imx6_pcie_init_phy(void)
>>>
>>>  	return 0;
>>>  
>>>  }
>>>
>>> +__weak int imx6_pcie_toggle_reset(void)
>>> +{
>>> +	/* This function ought to be overridden ! */
>>> +	puts("WARNING: Make sure the PCIe nRESET line is connected!\n");
>>> +	return 0;
>>> +}
>>> +
>>
>> Just to know: I assume that the nRESET is implemented with a GPIO.
> 
> Yes, that's how it is on all designs I saw thus far (but see below).
> 
>> I am
>> expecting then in the board files a diffusion of imx6_pcie_toggle_reset,
>> where the oinly difference is the number of GPIO.
> 
> The problem is, there are boards with no nRESET connected to the slot.

Any reference to the Sabrelite is, of course, purely coincidental. But
this is a hardware bug on a specific board and we should not adjust all
boards according to the broken one.

What do you think to check the validity of the GPIO ? For example,
setting the GPIO to -1 for sabrelite and printing the message if the
GPIO is negative or not defined ?

> These 
> boards are broken, thus will print the warning message.

Right - but there is nothing we can do it. The hardware must be fixed.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list