[U-Boot] [U-Boot, v1, 6/8] net/fman: add a fm_enable_port function

Valentin Longchamp valentin.longchamp at keymile.com
Mon Aug 19 17:28:14 CEST 2013


On 08/13/2013 10:38 PM, York Sun wrote:
> On 07/26/2013 03:02 AM, Valentin Longchamp wrote:
>> This can be useful if we want to disable an interface in u-boot and
>> later reenable them, so that it looks available when trying to fix the
>> FDT or for the kernel.
>>
>> Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
>>
>> ---
>> drivers/net/fm/init.c | 7 +++++++
>>  include/fm_eth.h      | 1 +
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
>> index 5908c32..820277e 100644
>> --- a/drivers/net/fm/init.c
>> +++ b/drivers/net/fm/init.c
>> @@ -158,6 +158,13 @@ void fm_disable_port(enum fm_port port)
>>  	fman_disable_port(port);
>>  }
>>  
>> +void fm_enable_port(enum fm_port port)
>> +{
>> +	int i = fm_port_to_index(port);
>> +
>> +	fm_info[i].enabled = 1;
>> +}
>> +
>>  void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus)
>>  {
>>  	int i = fm_port_to_index(port);
>> diff --git a/include/fm_eth.h b/include/fm_eth.h
>> index 8fcf172..b464e04 100644
>> --- a/include/fm_eth.h
>> +++ b/include/fm_eth.h
>> @@ -162,5 +162,6 @@ void fm_info_set_phy_address(enum fm_port port, int address);
>>  int fm_info_get_phy_address(enum fm_port port);
>>  void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus);
>>  void fm_disable_port(enum fm_port port);
>> +void fm_enable_port(enum fm_port port);
>>  
> 
> Is this function called somewhere?
> 

Yes it is used in the patch 8/8 of this series.

Valentin



More information about the U-Boot mailing list