Wolfgang Denk schrieb:
> In message <[EMAIL PROTECTED]> you wrote:
>   
>> Signed-off-by: Ricardo Ribalda Delgado <[EMAIL PROTECTED]>
>>     
>
> What is the intention or practical use of this dummy driver?
>
>
>   
I think we could use it well for mounting different memory
configurations on the same base board.
This happens frequently due to different size requests from customers or
chip-replacement.
Actually I'll have to compile u-boot for each memory config ... very bad.

Getting the data out of flash (environment or small dedicated sector)
would be fine.

Creating valid eeprom entries for use as SPD is another thing of ocurse.


>> --- a/drivers/i2c/Makefile
>> +++ b/drivers/i2c/Makefile
>> @@ -30,6 +30,7 @@ COBJS-y += omap1510_i2c.o
>>     
> ...
>   
>> +COBJS-y += dummy_i2c.o
>>     
>
> Please make "COBJS-$(CONFIG_DUMMY_I2C) += dummy_i2c.o" and ...
>
>   
>> diff --git a/drivers/i2c/dummy_i2c.c b/drivers/i2c/dummy_i2c.c
>> new file mode 100644
>> index 0000000..04f6edb
>> --- /dev/null
>> +++ b/drivers/i2c/dummy_i2c.c
>> @@ -0,0 +1,84 @@
>>     
> ...
>
>   
>> +    (C) Copyright 2008
>> +    Ricado Ribalda, Universidad Autonoma de Madrid, 
>> ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
>>     
>
> [Line too long]
>
>   
>> +    This program is free software: you can redistribute it and/or modify
>> +    it under the terms of the GNU General Public License as published by
>> +    the Free Software Foundation, either version 3 of the License, or
>> +    (at your option) any later version.
>>     
>
> [ GPLv2 needed]
>
>   
>> +#if defined(CONFIG_DUMMY_I2C)
>>     
>
> ... drop this #ifdef / #endif
>
>   
>> +
>> +#include <i2c.h>
>> +u8 
>> i2c_dummy_buffer[256]={0x80,0x8,0x8,0x0D,0x0A,0x60,0x40,0x0,0x5,0x3D,0x50,0x0,0x82,0x10,0x0,0x0,0x0C,0x4,0x18,0x1,0x4,0x0,0x1,0x50,0x50,0x0,0x0,0x3C,0x28,0x3C,0x2D,0x40,0x25,0x37,0x10,0x22,0x3C,0x1E,0x1E,0x0,0x0,0x3C,0x69,0x80,0x1E,0x28,0x0,0x0,0x0,
>> 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12,0xC9,0x2C,'0','0','0','0','0','0','0',0x0,'4','H','T','F','3','2','6','4','H','Y','-','5','3','E','D','3',0x3,0x0,0x0,0x0,0x0};
>>     
>
> Line way too long.
>
> Maybe you also want to explain where these magic data is coming from
> or what it means?
>
>   
>> +    if (alen!=1)
>>     
>
>       if (alen != 1)
>
>   
>> +            return -1;
>> +
>> +    if (addr+len>0xff)
>>     
>
>       if (addr+len > 0xff)
>
>   
>> +            return -1;
>> +
>> +    for(i=0;i<len;i++){
>>     
>
>       for (i=0; i<len; i++) {
>
>   
>> +            buffer[i]=i2c_dummy_buffer[i+addr];
>>     
>
>               buffer[i] = i2c_dummy_buffer[i+addr];
>
> etc., please.
>
>
> Best regards,
>
> Wolfgang Denk
>
>   


MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to