[PATCH 05/12] bsp/altera-cyclone-v: Enable L2 cache for network driver

Ralf Kirchner ralf.kirchner at embedded-brains.de
Wed May 28 12:23:48 UTC 2014


Am 27.05.2014 16:55, schrieb Gedare Bloom:
> On Tue, May 27, 2014 at 10:45 AM, Ralf Kirchner
> <ralf.kirchner at embedded-brains.de> wrote:
>> ---
>>  c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c |   15 ++++++++++++++-
>>  1 Datei geändert, 14 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
>>
>> diff --git a/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c b/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
>> index d2f669a..d591e4e 100644
>> --- a/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
>> +++ b/c/src/lib/libbsp/arm/altera-cyclone-v/network/network.c
>> @@ -40,6 +40,7 @@
>>  #include <bsp/alt_generalpurpose_io.h>
>>  #include <bsp/nocache-heap.h>
>>  #include "socal/alt_rstmgr.h"
>> +#include "socal/alt_sysmgr.h"
>>  #include "socal/hps.h"
>>  #include "socal/socal.h"
>>  #include <libchip/dwmac.h>
>> @@ -1082,7 +1083,19 @@ static int network_if_bus_setup( void *arg )
>>  {
>>    (void) arg;
>>
> I think we usually put the (void) unused_arguments; after the
> declarations of local variables.
> 
Corrected.
>> -  /* Nothing to be done */
>> +  uint32_t reg = *((uint32_t*)ALT_SYSMGR_EMAC_L3MST_ADDR);
>> +
> Is there not something like alt_read_word()?
> 
There is. Thanks for the catch. Corrected.
>> +  reg &= ALT_SYSMGR_EMAC_L3MST_AWCACHE_1_CLR_MSK;
>> +  reg &= ALT_SYSMGR_EMAC_L3MST_ARCACHE_1_CLR_MSK;
>> +  reg |= ALT_SYSMGR_EMAC_L3MST_AWCACHE_1_SET(
>> +    ALT_SYSMGR_EMAC_L3MST_AWCACHE_1_E_CACHE_WRBACK_ALLOC
>> +  );
>> +  reg |= ALT_SYSMGR_EMAC_L3MST_ARCACHE_1_SET(
>> +    ALT_SYSMGR_EMAC_L3MST_ARCACHE_1_E_CACHE_WRBACK_ALLOC
>> +  );
>> +
>> +  alt_write_word( ALT_SYSMGR_EMAC_L3MST_ADDR, reg );
>> +
>>    return 0;
>>  }
>>
>> --
>> 1.7.10.4
>>
>> _______________________________________________
>> rtems-devel mailing list
>> rtems-devel at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-devel


-- 
--------------------------------------------
Embedded Brains GmbH
Ralf Kirchner          Dornierstr. 4
D-82178 Puchheim       Germany
email: ralf.kirchner at embedded-brains.de
Phone: +49(0)89/1894741-17
Fax:   +49(0)89/1894741-08

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list