public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Support for the ML507 Xilinx Board
@ 2008-07-10 17:53 Ricardo Ribalda Delgado
  2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
  0 siblings, 1 reply; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 17:53 UTC (permalink / raw)
  To: u-boot

Hi List:

<Sorry for the multiple submitions, but I think that this will safe
a lot of time for our main developers. BTW: This is the first time
I use git>

This is my first contribution to u-boot. I have ported u-boot to the
ML507 Board by Xilinx.
http://www.xilinx.com/products/devkits/HW-V5-ML507-UNI-G.htm

This boards includes an FPGA Virtex 5 FX with an embedded PowerPC 440.

The port supports:
   -Virtex 5 ppc440x5
   -XIlinx Interrupt Controller
   -Xilinx I2C Controller (Interrupted mode)
   -Xilinx Uart Lite (simple port)
   -Xilinx LL_TEMA (Interrupted and SGDMA)
   -Save environment on board eeprom
   -DTT support for the ADT sensor on board (new hwmon driver)
   -Dummy I2C driver (for testing purposes)

This patch works against the last commit to the p4xx branch.

I am a researcher of the Universidad Autonoma de Madrid, and this work
has been supported by Q-Technology ( http://qtec.com ) under a
Research Agreement.

Any comment will be very welcomed.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 17:53 [U-Boot-Users] Support for the ML507 Xilinx Board Ricardo Ribalda Delgado
@ 2008-07-10 17:53 ` Ricardo Ribalda Delgado
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
                     ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 17:53 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
 drivers/hwmon/Makefile  |    1 +
 drivers/hwmon/adt7460.c |   89 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
 include/dtt.h           |    2 +-
 4 files changed, 140 insertions(+), 1 deletions(-)
 create mode 100644 drivers/hwmon/adt7460.c
 create mode 100644 drivers/hwmon/adt7460.h

diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 065433a..83aa297 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -34,6 +34,7 @@ COBJS-y += adm1021.o
 COBJS-y += ds1621.o
 COBJS-y += ds1722.o
 COBJS-y += ds1775.o
+COBJS-y += adt7460.o
 COBJS-$(CONFIG_DTT_LM73) += lm73.o
 COBJS-y += lm75.o
 COBJS-y += lm81.o
diff --git a/drivers/hwmon/adt7460.c b/drivers/hwmon/adt7460.c
new file mode 100644
index 0000000..255d6ed
--- /dev/null
+++ b/drivers/hwmon/adt7460.c
@@ -0,0 +1,89 @@
+/*   
+    (C) Copyright 2008
+    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
+    This work has been supported by: Q-Technology  http://qtec.com/
+
+    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.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <common.h>
+
+#ifdef CONFIG_DTT_ADT7460
+
+#include <i2c.h>
+#include <dtt.h>
+#include "adt7460.h"
+
+#define ADT7460_ADDRESS 0x2c
+
+
+int dtt_read(int sensor, int reg)
+{
+	u8 dir=reg;
+	u8 data;
+
+	if (-1==i2c_read(ADT7460_ADDRESS,dir,1,&data,1))
+		return -1;
+	
+	if (data==ADT7460_INVALID)
+		return -1;
+
+	return data;
+
+} 
+
+
+int dtt_write(int sensor, int reg, int val)
+{
+	u8 dir=reg;
+	u8 data=val;
+	
+	if (-1==i2c_write(ADT7460_ADDRESS,dir,1,&data,1))
+		return -1;
+
+	return 0;
+} 
+
+
+
+int dtt_init (void)
+{
+	printf("ADT7460 at I2C address 0x%2x\n",ADT7460_ADDRESS);
+	if (-1==dtt_write(0,ADT7460_CONFIG,1)){
+		printf("Error initialiting ADT7460\n");
+		return -1;
+	}
+	return 0;
+} 
+
+
+int dtt_get_temp(int sensor)
+{
+	int aux;
+	u8 table[]={ADT7460_REM1_TEMP,ADT7460_LOCAL_TEMP,ADT7460_REM2_TEMP};
+	if (sensor>2){
+		printf("DTT sensor does not exist\n");
+		return -1;
+	}
+	
+	aux=dtt_read(0,table[sensor]);
+
+	if (-1==aux){
+		printf("DTT temperature read failed\n");
+		return -1;
+
+	}
+	return aux;
+}
+#endif 
diff --git a/drivers/hwmon/adt7460.h b/drivers/hwmon/adt7460.h
new file mode 100644
index 0000000..48666f7
--- /dev/null
+++ b/drivers/hwmon/adt7460.h
@@ -0,0 +1,49 @@
+/*   
+    (C) Copyright 2008
+    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
+    This work has been supported by: Q-Technology  http://qtec.com/    
+
+    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.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef ADT7460
+#define ADT7460
+
+
+#define ADT7460_INVALID 128
+
+#define ADT7460_2_5V		0x20
+#define ADT7460_VCCP		0x21
+#define ADT7460_VCC		0x22
+#define ADT7460_V5		0x23
+#define ADT7460_V12		0x24
+#define ADT7460_REM1_TEMP	0x25
+#define ADT7460_LOCAL_TEMP	0x26
+#define ADT7460_REM2_TEMP	0x27
+#define ADT7460_TACH1L		0x28
+#define ADT7460_TACH1H		0x29
+#define ADT7460_TACH2L		0x2a
+#define ADT7460_TACH2H		0x2b
+#define ADT7460_TACH3L		0x2c
+#define ADT7460_TACH3H		0x2d
+#define ADT7460_TACH4L		0x2e
+#define ADT7460_TACH4H		0x2f
+#define ADT7460_TACH5L		0xa9
+#define ADT7460_TACH5H		0xaa
+#define ADT7460_TACH6L		0xab
+#define ADT7460_TACH6H		0xac
+#define ADT7460_REVISION	0x3f
+#define ADT7460_CONFIG		0x40
+
+
+#endif
diff --git a/include/dtt.h b/include/dtt.h
index 4e8aaad..73d7547 100644
--- a/include/dtt.h
+++ b/include/dtt.h
@@ -32,7 +32,7 @@
     defined(CONFIG_DTT_DS1775) || \
     defined(CONFIG_DTT_LM81) || \
     defined(CONFIG_DTT_ADM1021) || \
-    defined(CONFIG_DTT_LM73)
+    defined(CONFIG_DTT_LM73)||defined(CONFIG_DTT_ADT7460)
 
 #define CONFIG_DTT				/* We have a DTT */
 
-- 
1.5.6.2

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
@ 2008-07-10 17:53   ` Ricardo Ribalda Delgado
       [not found]     ` <1215712408-23567-4-git-send-email-ricardo.ribalda@uam.es>
                       ` (3 more replies)
  2008-07-10 18:10   ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Jerry Van Baren
                     ` (2 subsequent siblings)
  3 siblings, 4 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 17:53 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
 drivers/i2c/Makefile    |    1 +
 drivers/i2c/dummy_i2c.c |   84 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 85 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/dummy_i2c.c

diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 534c015..322c822 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -30,6 +30,7 @@ COBJS-y += omap1510_i2c.o
 COBJS-y += omap24xx_i2c.o
 COBJS-y += tsi108_i2c.o
 COBJS-y += mxc_i2c.o
+COBJS-y += dummy_i2c.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
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
+    This work has been supported by: Q-Technology  http://qtec.com/
+
+    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.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <common.h>
+
+#if defined(CONFIG_DUMMY_I2C)
+
+
+#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};
+	
+
+
+void i2c_init(int speed, int slaveaddr){
+	return ;
+}
+
+
+
+int
+i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len)
+{
+	int i;
+	if (alen!=1)
+		return -1;
+
+	if (addr+len>0xff)
+		return -1;
+
+	for(i=0;i<len;i++){
+		buffer[i]=i2c_dummy_buffer[i+addr];
+	}
+
+	return 0;
+
+
+}
+
+
+int
+i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len)
+{
+	int i;
+	if (alen!=1)
+		return -1;
+	if (addr+len>0xff)
+		return -1;
+
+	for(i=0;i<len;i++){
+		i2c_dummy_buffer[i+addr]=buffer[i];
+	}
+
+	return 0;
+}
+
+
+int
+i2c_probe(uchar chip)
+{
+	return 0;
+}
+
+
+
+
+
+#endif
+
-- 
1.5.6.2

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX
       [not found]         ` <1215712408-23567-6-git-send-email-ricardo.ribalda@uam.es>
@ 2008-07-10 17:53           ` Ricardo Ribalda Delgado
  2008-07-10 17:53             ` [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx Ricardo Ribalda Delgado
  2008-07-10 18:36             ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Wolfgang Denk
  0 siblings, 2 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 17:53 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
 cpu/ppc4xx/4xx_enet.c       |    2 +-
 cpu/ppc4xx/4xx_uart.c       |    4 ++++
 cpu/ppc4xx/cpu.c            |    5 +++++
 cpu/ppc4xx/gpio.c           |    5 +++++
 cpu/ppc4xx/interrupts.c     |    6 ++++++
 cpu/ppc4xx/miiphy.c         |    5 +++++
 cpu/ppc4xx/speed.c          |    5 ++++-
 cpu/ppc4xx/start.S          |    1 +
 include/asm-ppc/processor.h |    2 ++
 net/eth.c                   |    3 ++-
 10 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index 4e863dc..d55ce56 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -97,7 +97,7 @@
  * network support enabled.
  * Remark: CONFIG_405 describes Xilinx PPC405 FPGA without EMAC controller!
  */
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480)
+#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480) && !defined(CONFIG_440_VIRTEX5)
 
 #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
 #error "CONFIG_MII has to be defined!"
diff --git a/cpu/ppc4xx/4xx_uart.c b/cpu/ppc4xx/4xx_uart.c
index a7587d4..e79c48c 100644
--- a/cpu/ppc4xx/4xx_uart.c
+++ b/cpu/ppc4xx/4xx_uart.c
@@ -48,6 +48,7 @@
 #include <watchdog.h>
 #include <asm/ppc4xx-intvec.h>
 
+#if !defined(CONFIG_440_VIRTEX5)
 #ifdef CONFIG_SERIAL_MULTI
 #include <serial.h>
 #endif
@@ -58,6 +59,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+
 #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
     defined(CONFIG_405EX) || defined(CONFIG_440)
@@ -873,3 +875,5 @@ int serial_tstc(void)
 #endif /* CONFIG_SERIAL_MULTI */
 
 #endif	/* CONFIG_405GP || CONFIG_405CR */
+
+#endif
diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c
index 39f439d..defbbba 100644
--- a/cpu/ppc4xx/cpu.c
+++ b/cpu/ppc4xx/cpu.c
@@ -508,6 +508,11 @@ int checkcpu (void)
 		puts("GT Rev. A");
 		strcpy(addstr, "Security/Kasumi support");
 		break;
+	
+	case PVR_VIRTEX5:
+		printf(" VIRTEX5");
+		break;
+
 
 	default:
 		printf (" UNKNOWN (PVR=%08x)", pvr);
diff --git a/cpu/ppc4xx/gpio.c b/cpu/ppc4xx/gpio.c
index df99f53..59159ee 100644
--- a/cpu/ppc4xx/gpio.c
+++ b/cpu/ppc4xx/gpio.c
@@ -26,6 +26,9 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 
+
+#if !defined(CONFIG_440_VIRTEX5)
+
 #if defined(CFG_4xx_GPIO_TABLE)
 gpio_param_s const gpio_tab[GPIO_GROUP_MAX][GPIO_MAX] = CFG_4xx_GPIO_TABLE;
 #endif
@@ -253,3 +256,5 @@ void gpio_set_chip_configuration(void)
 	}
 }
 #endif /* CFG_4xx_GPIO_TABLE */
+
+#endif
diff --git a/cpu/ppc4xx/interrupts.c b/cpu/ppc4xx/interrupts.c
index 8620e2b..7c7b073 100644
--- a/cpu/ppc4xx/interrupts.c
+++ b/cpu/ppc4xx/interrupts.c
@@ -28,6 +28,9 @@
  */
 
 #include <common.h>
+
+#if !defined(CONFIG_440_VIRTEX5)
+
 #include <watchdog.h>
 #include <command.h>
 #include <asm/processor.h>
@@ -393,3 +396,6 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	return 0;
 }
 #endif
+
+
+#endif
diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c
index c882720..172fbcd 100644
--- a/cpu/ppc4xx/miiphy.c
+++ b/cpu/ppc4xx/miiphy.c
@@ -43,6 +43,9 @@
 #include <405_mal.h>
 #include <miiphy.h>
 
+
+#if !defined(CONFIG_440_VIRTEX5)
+
 #if !defined(CONFIG_PHY_CLK_FREQ)
 #define CONFIG_PHY_CLK_FREQ	0
 #endif
@@ -331,3 +334,5 @@ int emac4xx_miiphy_write (char *devname, unsigned char addr, unsigned char reg,
 {
 	return emac_miiphy_command(addr, reg, EMAC_STACR_WRITE, value);
 }
+
+#endif
diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index 34bd721..5aa3655 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -415,7 +415,7 @@ ulong get_PCI_freq (void)
 	return sys_info.freqPCI;
 }
 
-#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE)
+#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE) &&!defined(CONFIG_440_VIRTEX5)
 void get_sys_info (sys_info_t * sysInfo)
 {
 	unsigned long strp0;
@@ -448,6 +448,8 @@ void get_sys_info (sys_info_t * sysInfo)
 	sysInfo->freqUART = sysInfo->freqPLB;
 }
 #else
+
+#if !defined(CONFIG_440_VIRTEX5)
 void get_sys_info (sys_info_t * sysInfo)
 {
 	unsigned long strp0;
@@ -534,6 +536,7 @@ void get_sys_info (sys_info_t * sysInfo)
 }
 
 #endif
+#endif
 
 #if defined(CONFIG_YUCCA)
 unsigned long determine_sysper(void)
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index 426bf3c..acb536d 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -367,6 +367,7 @@ skip_debug_init:
 	/*----------------------------------------------------------------*/
 	/* Setup interrupt vectors */
 	/*----------------------------------------------------------------*/
+	li	r0,0
 	mtspr	ivpr,r0		/* Vectors start at 0x0000_0000 */
 	li	r1,0x0100
 	mtspr	ivor0,r1	/* Critical input */
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 10fd478..04fa431 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -835,6 +835,8 @@
 #define PVR_86xx	0x80040000
 #define PVR_86xx_REV1	(PVR_86xx | 0x0010)
 
+#define PVR_VIRTEX5     0x7ff21912
+
 /*
  * For the 8xx processors, all of them report the same PVR family for
  * the PowerPC core. The various versions of these processors must be
diff --git a/net/eth.c b/net/eth.c
index 7fc9aee..763308d 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -291,6 +291,7 @@ int eth_initialize(bd_t *bis)
 	at91sam9_eth_initialize(bis);
 #endif
 
+
 	if (!eth_devices) {
 		puts ("No ethernet found.\n");
 		show_boot_progress (-64);
@@ -621,7 +622,7 @@ int eth_initialize(bd_t *bis)
 	at91rm9200_miiphy_initialize(bis);
 #endif
 #if defined(CONFIG_4xx) && !defined(CONFIG_IOP480) \
-	&& !defined(CONFIG_AP1000) && !defined(CONFIG_405)
+	&& !defined(CONFIG_AP1000) && !defined(CONFIG_405) && !defined(CONFIG_440_VIRTEX5)
 	emac4xx_miiphy_initialize(bis);
 #endif
 #if defined(CONFIG_MCF52x2)
-- 
1.5.6.2

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 17:53           ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Ricardo Ribalda Delgado
@ 2008-07-10 17:53             ` Ricardo Ribalda Delgado
  2008-07-10 18:41               ` Wolfgang Denk
  2008-07-11  6:30               ` Michal Simek
  2008-07-10 18:36             ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Wolfgang Denk
  1 sibling, 2 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 17:53 UTC (permalink / raw)
  To: u-boot


Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
---
 include/asm-ppc/arch-ppc4xx/xbasic_types.h |  301 ++++++++++++++++++++++++++++
 include/asm-ppc/arch-ppc4xx/xio.h          |   63 ++++++
 include/asm-ppc/arch-ppc4xx/xuartlite_l.h  |  256 +++++++++++++++++++++++
 include/asm-ppc/serial_xuartlite.h         |   25 +++
 4 files changed, 645 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-ppc/arch-ppc4xx/xbasic_types.h
 create mode 100644 include/asm-ppc/arch-ppc4xx/xio.h
 create mode 100644 include/asm-ppc/arch-ppc4xx/xuartlite_l.h
 create mode 100644 include/asm-ppc/serial_xuartlite.h

diff --git a/include/asm-ppc/arch-ppc4xx/xbasic_types.h b/include/asm-ppc/arch-ppc4xx/xbasic_types.h
new file mode 100644
index 0000000..25012e6
--- /dev/null
+++ b/include/asm-ppc/arch-ppc4xx/xbasic_types.h
@@ -0,0 +1,301 @@
+/******************************************************************************
+*
+*     Author: Xilinx, Inc.
+*
+*
+*     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 2 of the License, or (at your
+*     option) any later version.
+*
+*
+*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
+*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
+*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
+*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
+*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
+*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
+*     XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
+*     THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
+*     WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
+*     CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
+*     FITNESS FOR A PARTICULAR PURPOSE.
+*
+*
+*     Xilinx hardware products are not intended for use in life support
+*     appliances, devices, or systems. Use in such applications is
+*     expressly prohibited.
+*
+*
+*     (c) Copyright 2002-2003 Xilinx Inc.
+*     All rights reserved.
+*
+*
+*     You should have received a copy of the GNU General Public License along
+*     with this program; if not, write to the Free Software Foundation, Inc.,
+*     675 Mass Ave, Cambridge, MA 02139, USA.
+*
+******************************************************************************/
+/*****************************************************************************/
+/**
+*
+* @file xbasic_types.h
+*
+* This file contains basic types for Xilinx software IP.  These types do not
+* follow the standard naming convention with respect to using the component
+* name in front of each name because they are considered to be primitives.
+*
+* @note
+*
+* This file contains items which are architecture dependent.
+*
+* <pre>
+* MODIFICATION HISTORY:
+*
+* Ver	 Who	Date	Changes
+* ----- ---- -------- -----------------------------------------------
+* 1.00a rmm  12/14/01 First release
+*	rmm  05/09/03 Added "xassert always" macros to rid ourselves of diab
+*		      compiler warnings
+* </pre>
+*
+******************************************************************************/
+
+#ifndef XBASIC_TYPES_H		/* prevent circular inclusions */
+#define XBASIC_TYPES_H		/* by using protection macros */
+
+/***************************** Include Files *********************************/
+
+/************************** Constant Definitions *****************************/
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+/** Null */
+
+#define XCOMPONENT_IS_READY	0x11111111	/* component has been initialized */
+#define XCOMPONENT_IS_STARTED	0x22222222	/* component has been started */
+
+/* the following constants and declarations are for unit test purposes and are
+ * designed to be used in test applications.
+ */
+#define XTEST_PASSED	0
+#define XTEST_FAILED	1
+
+#define XASSERT_NONE	 0
+#define XASSERT_OCCURRED 1
+
+extern unsigned int XAssertStatus;
+extern void XAssert(char *, int);
+
+/**************************** Type Definitions *******************************/
+
+/** @name Primitive types
+ * These primitive types are created for transportability.
+ * They are dependent upon the target architecture.
+ * @{
+ */
+#include <linux/types.h>
+
+typedef struct {
+	u32 Upper;
+	u32 Lower;
+} Xuint64;
+
+/* Xilinx's unsigned integer types */
+typedef u32 Xuint32;
+typedef u16 Xuint16;
+typedef u8 Xuint8;
+
+/* and signed integer types */
+typedef s32 Xint32;
+typedef s16 Xint16;
+typedef s8 Xint8;
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+typedef unsigned long Xboolean;
+#define XNULL	NULL
+
+#define XTRUE	1
+#define XFALSE	0
+
+/*@}*/
+
+/**
+ * This data type defines an interrupt handler for a device.
+ * The argument points to the instance of the component
+ */
+typedef void (*XInterruptHandler) (void *InstancePtr);
+
+/**
+ * This data type defines a callback to be invoked when an
+ * assert occurs. The callback is invoked only when asserts are enabled
+ */
+typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
+
+/***************** Macros (Inline Functions) Definitions *********************/
+
+/*****************************************************************************/
+/**
+* Return the most significant half of the 64 bit data type.
+*
+* @param x is the 64 bit word.
+*
+* @return
+*
+* The upper 32 bits of the 64 bit word.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XUINT64_MSW(x) ((x).Upper)
+
+/*****************************************************************************/
+/**
+* Return the least significant half of the 64 bit data type.
+*
+* @param x is the 64 bit word.
+*
+* @return
+*
+* The lower 32 bits of the 64 bit word.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XUINT64_LSW(x) ((x).Lower)
+
+#ifndef NDEBUG
+
+/*****************************************************************************/
+/**
+* This assert macro is to be used for functions that do not return anything
+* (void). This in conjunction with the XWaitInAssert boolean can be used to
+* accomodate tests so that asserts which fail allow execution to continue.
+*
+* @param expression is the expression to evaluate. If it evaluates to false,
+*	 the assert occurs.
+*
+* @return
+*
+* Returns void unless the XWaitInAssert variable is true, in which case
+* no return is made and an infinite loop is entered.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XASSERT_VOID(expression)			\
+{							\
+	if (expression) {				\
+		XAssertStatus = XASSERT_NONE;		\
+	} else {					\
+		XAssert(__FILE__, __LINE__);		\
+		XAssertStatus = XASSERT_OCCURRED;	\
+		return;					\
+	}						\
+}
+
+/*****************************************************************************/
+/**
+* This assert macro is to be used for functions that do return a value. This in
+* conjunction with the XWaitInAssert boolean can be used to accomodate tests so
+* that asserts which fail allow execution to continue.
+*
+* @param expression is the expression to evaluate. If it evaluates to false,
+*	 the assert occurs.
+*
+* @return
+*
+* Returns 0 unless the XWaitInAssert variable is true, in which case
+* no return is made and an infinite loop is entered.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XASSERT_NONVOID(expression)			\
+{							\
+	if (expression) {				\
+		XAssertStatus = XASSERT_NONE;		\
+	} else {					\
+		XAssert(__FILE__, __LINE__);		\
+		XAssertStatus = XASSERT_OCCURRED;	\
+		return 0;				\
+	}						\
+}
+
+/*****************************************************************************/
+/**
+* Always assert. This assert macro is to be used for functions that do not
+* return anything (void). Use for instances where an assert should always
+* occur.
+*
+* @return
+*
+* Returns void unless the XWaitInAssert variable is true, in which case
+* no return is made and an infinite loop is entered.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XASSERT_VOID_ALWAYS()				\
+{							\
+	XAssert(__FILE__, __LINE__);			\
+	XAssertStatus = XASSERT_OCCURRED;		\
+	return;						\
+}
+
+/*****************************************************************************/
+/**
+* Always assert. This assert macro is to be used for functions that do return
+* a value. Use for instances where an assert should always occur.
+*
+* @return
+*
+* Returns void unless the XWaitInAssert variable is true, in which case
+* no return is made and an infinite loop is entered.
+*
+* @note
+*
+* None.
+*
+******************************************************************************/
+#define XASSERT_NONVOID_ALWAYS()			\
+{							\
+	XAssert(__FILE__, __LINE__);			\
+	XAssertStatus = XASSERT_OCCURRED;		\
+	return 0;					\
+}
+
+#else
+
+#define XASSERT_VOID(expression)
+#define XASSERT_VOID_ALWAYS()
+#define XASSERT_NONVOID(expression)
+#define XASSERT_NONVOID_ALWAYS()
+#endif
+
+/************************** Function Prototypes ******************************/
+
+void XAssertSetCallback(XAssertCallback Routine);
+
+#endif	/* end of protection macro */
diff --git a/include/asm-ppc/arch-ppc4xx/xio.h b/include/asm-ppc/arch-ppc4xx/xio.h
new file mode 100644
index 0000000..7eed327
--- /dev/null
+++ b/include/asm-ppc/arch-ppc4xx/xio.h
@@ -0,0 +1,63 @@
+/*
+ * xio.h
+ *
+ * Defines XIo functions for Xilinx OCP in terms of Linux primitives
+ *
+ * Author: MontaVista Software, Inc.
+ *         source at mvista.com
+ *
+ * 2002 (c) MontaVista, Software, Inc.  This file is licensed under the terms
+ * of the GNU General Public License version 2.  This program is licensed
+ * "as is" without any warranty of any kind, whether express or implied.
+ */
+
+#ifndef XIO_H
+#define XIO_H
+
+#include "xbasic_types.h"
+#include <asm/io.h>
+
+typedef u32 XIo_Address;
+
+extern inline u8
+XIo_In8(XIo_Address InAddress)
+{
+	return (u8) in_8((volatile unsigned char *) InAddress);
+}
+extern inline u16
+XIo_In16(XIo_Address InAddress)
+{
+	return (u16) in_be16((volatile unsigned short *) InAddress);
+}
+extern inline u32
+XIo_In32(XIo_Address InAddress)
+{
+	return (u32) in_be32((volatile unsigned *) InAddress);
+}
+extern inline void
+XIo_Out8(XIo_Address OutAddress, u8 Value)
+{
+	out_8((volatile unsigned char *) OutAddress, Value);
+}
+extern inline void
+XIo_Out16(XIo_Address OutAddress, u16 Value)
+{
+	out_be16((volatile unsigned short *) OutAddress, Value);
+}
+extern inline void
+XIo_Out32(XIo_Address OutAddress, u32 Value)
+{
+	out_be32((volatile unsigned *) OutAddress, Value);
+}
+
+#define XIo_ToLittleEndian16(s,d) (*(u16*)(d) = cpu_to_le16((u16)(s)))
+#define XIo_ToLittleEndian32(s,d) (*(u32*)(d) = cpu_to_le32((u32)(s)))
+#define XIo_ToBigEndian16(s,d) (*(u16*)(d) = cpu_to_be16((u16)(s)))
+#define XIo_ToBigEndian32(s,d) (*(u32*)(d) = cpu_to_be32((u32)(s)))
+
+#define XIo_FromLittleEndian16(s,d) (*(u16*)(d) = le16_to_cpu((u16)(s)))
+#define XIo_FromLittleEndian32(s,d) (*(u32*)(d) = le32_to_cpu((u32)(s)))
+#define XIo_FromBigEndian16(s,d) (*(u16*)(d) = be16_to_cpu((u16)(s)))
+#define XIo_FromBigEndian32(s,d) (*(u32*)(d) = be32_to_cpu((u32)(s)))
+
+#endif				/* XIO_H */
diff --git a/include/asm-ppc/arch-ppc4xx/xuartlite_l.h b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
new file mode 100644
index 0000000..b381a0d
--- /dev/null
+++ b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
@@ -0,0 +1,256 @@
+/*****************************************************************************
+*
+*	XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
+*	AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
+*	SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
+*	OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
+*	APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
+*	THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
+*	AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
+*	FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
+*	WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
+*	IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
+*	REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
+*	INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+*	FOR A PARTICULAR PURPOSE.
+*
+*	(c) Copyright 2002 Xilinx Inc.
+*	All rights reserved.
+*
+*****************************************************************************/
+/****************************************************************************/
+/**
+*
+* @file xuartlite_l.h
+*
+* This header file contains identifiers and low-level driver functions (or
+* macros) that can be used to access the device.  High-level driver functions
+* are defined in xuartlite.h.
+*
+* <pre>
+* MODIFICATION HISTORY:
+*
+* Ver	Who  Date     Changes
+* ----- ---- -------- -----------------------------------------------
+* 1.00b rpm  04/25/02 First release
+* </pre>
+*
+*****************************************************************************/
+
+#ifndef XUARTLITE_L_H /* prevent circular inclusions */
+#define XUARTLITE_L_H /* by using protection macros */
+
+/***************************** Include Files ********************************/
+
+#include "xbasic_types.h"
+#include "xio.h"
+
+/************************** Constant Definitions ****************************/
+
+/* UART Lite register offsets */
+
+#define XUL_RX_FIFO_OFFSET		0   /* receive FIFO, read only */
+#define XUL_TX_FIFO_OFFSET		4   /* transmit FIFO, write only */
+#define XUL_STATUS_REG_OFFSET		8   /* status register, read only */
+#define XUL_CONTROL_REG_OFFSET		12  /* control register, write only */
+
+/* control register bit positions */
+
+#define XUL_CR_ENABLE_INTR		0x10	/* enable interrupt */
+#define XUL_CR_FIFO_RX_RESET		0x02	/* reset receive FIFO */
+#define XUL_CR_FIFO_TX_RESET		0x01	/* reset transmit FIFO */
+
+/* status register bit positions */
+
+#define XUL_SR_PARITY_ERROR		0x80
+#define XUL_SR_FRAMING_ERROR		0x40
+#define XUL_SR_OVERRUN_ERROR		0x20
+#define XUL_SR_INTR_ENABLED		0x10	/* interrupt enabled */
+#define XUL_SR_TX_FIFO_FULL		0x08	/* transmit FIFO full */
+#define XUL_SR_TX_FIFO_EMPTY		0x04	/* transmit FIFO empty */
+#define XUL_SR_RX_FIFO_FULL		0x02	/* receive FIFO full */
+#define XUL_SR_RX_FIFO_VALID_DATA	0x01	/* data in receive FIFO */
+
+/* the following constant specifies the size of the FIFOs, the size of the
+ * FIFOs includes the transmitter and receiver such that it is the total number
+ * of bytes that the UART can buffer
+ */
+#define XUL_FIFO_SIZE		    16
+
+/* Stop bits are fixed at 1. Baud, parity, and data bits are fixed on a
+ * per instance basis
+ */
+#define XUL_STOP_BITS		    1
+
+/* Parity definitions
+ */
+#define XUL_PARITY_NONE		    0
+#define XUL_PARITY_ODD		    1
+#define XUL_PARITY_EVEN		    2
+
+/**************************** Type Definitions ******************************/
+
+/***************** Macros (Inline Functions) Definitions ********************/
+
+/*****************************************************************************
+*
+* Low-level driver macros and functions. The list below provides signatures
+* to help the user use the macros.
+*
+* void XUartLite_mSetControlReg(u32 BaseAddress, u32 Mask)
+* u32 XUartLite_mGetControlReg(u32 BaseAddress)
+* u32 XUartLite_mGetStatusReg(u32 BaseAddress)
+*
+* Xboolean XUartLite_mIsReceiveEmpty(u32 BaseAddress)
+* Xboolean XUartLite_mIsTransmitFull(u32 BaseAddress)
+* Xboolean XUartLite_mIsIntrEnabled(u32 BaseAddress)
+*
+* void XUartLite_mEnableIntr(u32 BaseAddress)
+* void XUartLite_mDisableIntr(u32 BaseAddress)
+*
+* void XUartLite_SendByte(u32 BaseAddress, u8 Data);
+* u8 XUartLite_RecvByte(u32 BaseAddress);
+*
+*****************************************************************************/
+
+/****************************************************************************/
+/**
+*
+* Set the contents of the control register. Use the XUL_CR_* constants defined
+* above to create the bit-mask to be written to the register.
+*
+* @param    BaseAddress is the base address of the device
+* @param    Mask is the 32-bit value to write to the control register
+*
+* @return   None.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mSetControlReg(BaseAddress, Mask) \
+		    XIo_Out32((BaseAddress) + XUL_CONTROL_REG_OFFSET, (Mask))
+
+
+/****************************************************************************/
+/**
+*
+* Get the contents of the control register. Use the XUL_CR_* constants defined
+* above to interpret the bit-mask returned.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   A 32-bit value representing the contents of the control register.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mGetControlReg(BaseAddress) \
+		    XIo_In32((BaseAddress) + XUL_CONTROL_REG_OFFSET)
+
+
+/****************************************************************************/
+/**
+*
+* Get the contents of the status register. Use the XUL_SR_* constants defined
+* above to interpret the bit-mask returned.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   A 32-bit value representing the contents of the status register.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mGetStatusReg(BaseAddress) \
+		    XIo_In32((BaseAddress) + XUL_STATUS_REG_OFFSET)
+
+
+/****************************************************************************/
+/**
+*
+* Check to see if the receiver has data.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   XTRUE if the receiver is empty, XFALSE if there is data present.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mIsReceiveEmpty(BaseAddress) \
+	  (!(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_RX_FIFO_VALID_DATA))
+
+
+/****************************************************************************/
+/**
+*
+* Check to see if the transmitter is full.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   XTRUE if the transmitter is full, XFALSE otherwise.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mIsTransmitFull(BaseAddress) \
+		(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_TX_FIFO_FULL)
+
+
+/****************************************************************************/
+/**
+*
+* Check to see if the interrupt is enabled.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   XTRUE if the interrupt is enabled, XFALSE otherwise.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mIsIntrEnabled(BaseAddress) \
+		(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_INTR_ENABLED)
+
+
+/****************************************************************************/
+/**
+*
+* Enable the device interrupt. Preserve the contents of the control register.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   None.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mEnableIntr(BaseAddress) \
+	       XUartLite_mSetControlReg((BaseAddress), \
+		   XUartLite_mGetControlReg((BaseAddress)) | XUL_CR_ENABLE_INTR)
+
+
+/****************************************************************************/
+/**
+*
+* Disable the device interrupt. Preserve the contents of the control register.
+*
+* @param    BaseAddress is the	base address of the device
+*
+* @return   None.
+*
+* @note	    None.
+*
+*****************************************************************************/
+#define XUartLite_mDisableIntr(BaseAddress) \
+	      XUartLite_mSetControlReg((BaseAddress), \
+		  XUartLite_mGetControlReg((BaseAddress)) & ~XUL_CR_ENABLE_INTR)
+
+
+/************************** Function Prototypes *****************************/
+
+void XUartLite_SendByte(u32 BaseAddress, u8 Data);
+u8 XUartLite_RecvByte(u32 BaseAddress);
+
+
+#endif		  /* end of protection macro */
diff --git a/include/asm-ppc/serial_xuartlite.h b/include/asm-ppc/serial_xuartlite.h
new file mode 100644
index 0000000..6cd1e83
--- /dev/null
+++ b/include/asm-ppc/serial_xuartlite.h
@@ -0,0 +1,25 @@
+/*
+ * (C) Copyright 2004 Atmark Techno, Inc.
+ *
+ * Yasushi SHOJI <yashi@atmark-techno.com>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <asm/arch/xuartlite_l.h>
-- 
1.5.6.2

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
@ 2008-07-10 18:10   ` Jerry Van Baren
  2008-07-10 18:16     ` Ricardo Ribalda Delgado
  2008-07-10 19:58   ` Wolfgang Denk
  2008-07-11  6:49   ` Michal Simek
  3 siblings, 1 reply; 26+ messages in thread
From: Jerry Van Baren @ 2008-07-10 18:10 UTC (permalink / raw)
  To: u-boot

Ricardo Ribalda Delgado wrote:
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  drivers/hwmon/Makefile  |    1 +
>  drivers/hwmon/adt7460.c |   89 +++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
>  include/dtt.h           |    2 +-
>  4 files changed, 140 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/hwmon/adt7460.c
>  create mode 100644 drivers/hwmon/adt7460.h

[snip]

> +++ b/drivers/hwmon/adt7460.c
> @@ -0,0 +1,89 @@
> +/*   
> +    (C) Copyright 2008
> +    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
> +    This work has been supported by: Q-Technology  http://qtec.com/
> +
> +    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

Hi Ricardo,

GPLv3 is a problem because most of u-boot is licensed at GPLv2 (possibly 
with an upgrade clause).  The problem is, GPLv3 is not backward 
compatible with GPLv2 because it adds restrictions.
   <http://www.fsf.org/licensing/licenses/>

If you wish to have this added to u-boot, you will need to change the 
licensing to GPLv2 (note that you can still keep the "any later" upgrade 
clause).

[snip]

> diff --git a/drivers/hwmon/adt7460.h b/drivers/hwmon/adt7460.h
> new file mode 100644
> index 0000000..48666f7
> --- /dev/null
> +++ b/drivers/hwmon/adt7460.h
> @@ -0,0 +1,49 @@
> +/*   
> +    (C) Copyright 2008
> +    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
> +    This work has been supported by: Q-Technology  http://qtec.com/    
> +
> +    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

Ditto.

Best regards,
gvb

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
       [not found]     ` <1215712408-23567-4-git-send-email-ricardo.ribalda@uam.es>
@ 2008-07-10 18:11     ` Jerry Van Baren
  2008-07-10 20:03     ` Wolfgang Denk
  2008-07-11  6:30     ` Michal Simek
  3 siblings, 0 replies; 26+ messages in thread
From: Jerry Van Baren @ 2008-07-10 18:11 UTC (permalink / raw)
  To: u-boot

Ricardo Ribalda Delgado wrote:
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  drivers/i2c/Makefile    |    1 +
>  drivers/i2c/dummy_i2c.c |   84 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 85 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/i2c/dummy_i2c.c
> 
> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
> index 534c015..322c822 100644
> --- a/drivers/i2c/Makefile
> +++ b/drivers/i2c/Makefile
> @@ -30,6 +30,7 @@ COBJS-y += omap1510_i2c.o
>  COBJS-y += omap24xx_i2c.o
>  COBJS-y += tsi108_i2c.o
>  COBJS-y += mxc_i2c.o
> +COBJS-y += dummy_i2c.o
>  
>  COBJS	:= $(COBJS-y)
>  SRCS	:= $(COBJS:.o=.c)
> 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
> +    This work has been supported by: Q-Technology  http://qtec.com/
> +
> +    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

Ditto: GPLv3 is a problem because most of u-boot is licensed at GPLv2 
(possibly with an upgrade clause).  The problem is, GPLv3 is not 
backward compatible with GPLv2 because it adds restrictions.
   <http://www.fsf.org/licensing/licenses/>

If you wish to have this added to u-boot, you will need to change the 
licensing to GPLv2 (note that you can still keep the "any later" upgrade 
clause).

Best regards,
gvb

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 18:10   ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Jerry Van Baren
@ 2008-07-10 18:16     ` Ricardo Ribalda Delgado
  2008-07-10 18:32       ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 18:16 UTC (permalink / raw)
  To: u-boot

Hello Jerry

I didn't know that.... I will change the license and resend the
patches as soon as I get more feedback to keep the mailing list as
silent as possible.

  Again: Thanks

On Thu, Jul 10, 2008 at 8:10 PM, Jerry Van Baren <gerald.vanbaren@ge.com> wrote:
> Ricardo Ribalda Delgado wrote:
>>
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
>> ---
>>  drivers/hwmon/Makefile  |    1 +
>>  drivers/hwmon/adt7460.c |   89
>> +++++++++++++++++++++++++++++++++++++++++++++++
>>  drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
>>  include/dtt.h           |    2 +-
>>  4 files changed, 140 insertions(+), 1 deletions(-)
>>  create mode 100644 drivers/hwmon/adt7460.c
>>  create mode 100644 drivers/hwmon/adt7460.h
>
> [snip]
>
>> +++ b/drivers/hwmon/adt7460.c
>> @@ -0,0 +1,89 @@
>> +/*   +    (C) Copyright 2008
>> +    Ricado Ribalda, Universidad Autonoma de Madrid,
>> ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
>> +    This work has been supported by: Q-Technology  http://qtec.com/
>> +
>> +    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
>
> Hi Ricardo,
>
> GPLv3 is a problem because most of u-boot is licensed at GPLv2 (possibly
> with an upgrade clause).  The problem is, GPLv3 is not backward compatible
> with GPLv2 because it adds restrictions.
>  <http://www.fsf.org/licensing/licenses/>
>
> If you wish to have this added to u-boot, you will need to change the
> licensing to GPLv2 (note that you can still keep the "any later" upgrade
> clause).
>
> [snip]
>
>> diff --git a/drivers/hwmon/adt7460.h b/drivers/hwmon/adt7460.h
>> new file mode 100644
>> index 0000000..48666f7
>> --- /dev/null
>> +++ b/drivers/hwmon/adt7460.h
>> @@ -0,0 +1,49 @@
>> +/*   +    (C) Copyright 2008
>> +    Ricado Ribalda, Universidad Autonoma de Madrid,
>> ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
>> +    This work has been supported by: Q-Technology  http://qtec.com/    +
>> +    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
>
> Ditto.
>
> Best regards,
> gvb
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 18:16     ` Ricardo Ribalda Delgado
@ 2008-07-10 18:32       ` Ricardo Ribalda Delgado
  2008-07-10 18:57         ` Wolfgang Denk
  0 siblings, 1 reply; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 18:32 UTC (permalink / raw)
  To: u-boot

Hello again

  I have modified the license of all the patches, and they are now located at:
     http://www.ii.uam.es/~rribalda/ml507.tgz
  Waiting for more comments

  Thanks for your time and comments




On Thu, Jul 10, 2008 at 8:16 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@uam.es> wrote:
> Hello Jerry
>
> I didn't know that.... I will change the license and resend the
> patches as soon as I get more feedback to keep the mailing list as
> silent as possible.
>
>  Again: Thanks
>
> On Thu, Jul 10, 2008 at 8:10 PM, Jerry Van Baren <gerald.vanbaren@ge.com> wrote:
>> Ricardo Ribalda Delgado wrote:
>>>
>>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
>>> ---
>>>  drivers/hwmon/Makefile  |    1 +
>>>  drivers/hwmon/adt7460.c |   89
>>> +++++++++++++++++++++++++++++++++++++++++++++++
>>>  drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
>>>  include/dtt.h           |    2 +-
>>>  4 files changed, 140 insertions(+), 1 deletions(-)
>>>  create mode 100644 drivers/hwmon/adt7460.c
>>>  create mode 100644 drivers/hwmon/adt7460.h
>>
>> [snip]
>>
>>> +++ b/drivers/hwmon/adt7460.c
>>> @@ -0,0 +1,89 @@
>>> +/*   +    (C) Copyright 2008
>>> +    Ricado Ribalda, Universidad Autonoma de Madrid,
>>> ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
>>> +    This work has been supported by: Q-Technology  http://qtec.com/
>>> +
>>> +    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
>>
>> Hi Ricardo,
>>
>> GPLv3 is a problem because most of u-boot is licensed at GPLv2 (possibly
>> with an upgrade clause).  The problem is, GPLv3 is not backward compatible
>> with GPLv2 because it adds restrictions.
>>  <http://www.fsf.org/licensing/licenses/>
>>
>> If you wish to have this added to u-boot, you will need to change the
>> licensing to GPLv2 (note that you can still keep the "any later" upgrade
>> clause).
>>
>> [snip]
>>
>>> diff --git a/drivers/hwmon/adt7460.h b/drivers/hwmon/adt7460.h
>>> new file mode 100644
>>> index 0000000..48666f7
>>> --- /dev/null
>>> +++ b/drivers/hwmon/adt7460.h
>>> @@ -0,0 +1,49 @@
>>> +/*   +    (C) Copyright 2008
>>> +    Ricado Ribalda, Universidad Autonoma de Madrid,
>>> ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
>>> +    This work has been supported by: Q-Technology  http://qtec.com/    +
>>> +    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
>>
>> Ditto.
>>
>> Best regards,
>> gvb
>>
>
>
>
> --
> Ricardo Ribalda
> http://www.eps.uam.es/~rribalda/
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX
  2008-07-10 17:53           ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Ricardo Ribalda Delgado
  2008-07-10 17:53             ` [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx Ricardo Ribalda Delgado
@ 2008-07-10 18:36             ` Wolfgang Denk
  2008-07-10 18:45               ` Ricardo Ribalda Delgado
  1 sibling, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 18:36 UTC (permalink / raw)
  To: u-boot

In message <1215712408-23567-7-git-send-email-ricardo.ribalda@uam.es> you wrote:
> 
> diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
> index 4e863dc..d55ce56 100644
> --- a/cpu/ppc4xx/4xx_enet.c
> +++ b/cpu/ppc4xx/4xx_enet.c
> @@ -97,7 +97,7 @@
>   * network support enabled.
>   * Remark: CONFIG_405 describes Xilinx PPC405 FPGA without EMAC controller!
>   */
> -#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480)
> +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480) && !defined(CONFIG_440_VIRTEX5)

Line too long.

>  #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
>  #error "CONFIG_MII has to be defined!"
> diff --git a/cpu/ppc4xx/4xx_uart.c b/cpu/ppc4xx/4xx_uart.c
> index a7587d4..e79c48c 100644
> --- a/cpu/ppc4xx/4xx_uart.c
> +++ b/cpu/ppc4xx/4xx_uart.c
> @@ -48,6 +48,7 @@
>  #include <watchdog.h>
>  #include <asm/ppc4xx-intvec.h>
>  
> +#if !defined(CONFIG_440_VIRTEX5)
>  #ifdef CONFIG_SERIAL_MULTI
>  #include <serial.h>
>  #endif
> @@ -58,6 +59,7 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> +

Too many empty lines.

>  #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
>      defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
>      defined(CONFIG_405EX) || defined(CONFIG_440)
> @@ -873,3 +875,5 @@ int serial_tstc(void)
>  #endif /* CONFIG_SERIAL_MULTI */
>  
>  #endif	/* CONFIG_405GP || CONFIG_405CR */
> +

Unnecessary empty line.

> +#endif
> diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c
> index 39f439d..defbbba 100644
> --- a/cpu/ppc4xx/cpu.c
> +++ b/cpu/ppc4xx/cpu.c
> @@ -508,6 +508,11 @@ int checkcpu (void)
>  		puts("GT Rev. A");
>  		strcpy(addstr, "Security/Kasumi support");
>  		break;
> +	
> +	case PVR_VIRTEX5:
> +		printf(" VIRTEX5");
> +		break;
> +
>  

Too many empty lines.

> --- a/cpu/ppc4xx/speed.c
> +++ b/cpu/ppc4xx/speed.c
> @@ -415,7 +415,7 @@ ulong get_PCI_freq (void)
>  	return sys_info.freqPCI;
>  }
>  
> -#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE)
> +#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE) &&!defined(CONFIG_440_VIRTEX5)

Line too long.

> --- a/cpu/ppc4xx/start.S
> +++ b/cpu/ppc4xx/start.S
> @@ -367,6 +367,7 @@ skip_debug_init:
>  	/*----------------------------------------------------------------*/
>  	/* Setup interrupt vectors */
>  	/*----------------------------------------------------------------*/
> +	li	r0,0

Why do you think this was necessary?

> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -291,6 +291,7 @@ int eth_initialize(bd_t *bis)
>  	at91sam9_eth_initialize(bis);
>  #endif
>  
> +

Too many empoty lines.

>  	if (!eth_devices) {
>  		puts ("No ethernet found.\n");
>  		show_boot_progress (-64);
> @@ -621,7 +622,7 @@ int eth_initialize(bd_t *bis)
>  	at91rm9200_miiphy_initialize(bis);
>  #endif
>  #if defined(CONFIG_4xx) && !defined(CONFIG_IOP480) \
> -	&& !defined(CONFIG_AP1000) && !defined(CONFIG_405)
> +	&& !defined(CONFIG_AP1000) && !defined(CONFIG_405) && !defined(CONFIG_440_VIRTEX5)

Line too long.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Some people march to the beat of a different drummer. And some people
tango!

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 17:53             ` [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx Ricardo Ribalda Delgado
@ 2008-07-10 18:41               ` Wolfgang Denk
  2008-07-10 18:52                 ` Ricardo Ribalda Delgado
  2008-07-11  6:30               ` Michal Simek
  1 sibling, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 18:41 UTC (permalink / raw)
  To: u-boot

In message <1215712408-23567-8-git-send-email-ricardo.ribalda@uam.es> you wrote:
> 
> +*     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 2 of the License, or (at your
> +*     option) any later version.
...
> +*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
> +*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
> +*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
> +*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
> +*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
> +*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.

This is IMHO in contradiction to the GPL clause above.

> +*     Xilinx hardware products are not intended for use in life support
> +*     appliances, devices, or systems. Use in such applications is
> +*     expressly prohibited.

This restriction is IMHO in contradiction to the GPL clause above.

...
> +#define XCOMPONENT_IS_READY	0x11111111	/* component has been initialized */
> +#define XCOMPONENT_IS_STARTED	0x22222222	/* component has been started */

Lines too long.

> +/* the following constants and declarations are for unit test purposes and are
> + * designed to be used in test applications.
> + */
> +#define XTEST_PASSED	0
> +#define XTEST_FAILED	1
> +
> +#define XASSERT_NONE	 0
> +#define XASSERT_OCCURRED 1
> +
> +extern unsigned int XAssertStatus;
> +extern void XAssert(char *, int);
> +
> +/**************************** Type Definitions *******************************/
> +
> +/** @name Primitive types
> + * These primitive types are created for transportability.
> + * They are dependent upon the target architecture.
> + * @{
> + */
> +#include <linux/types.h>
> +
> +typedef struct {
> +	u32 Upper;
> +	u32 Lower;
> +} Xuint64;
> +
> +/* Xilinx's unsigned integer types */
> +typedef u32 Xuint32;
> +typedef u16 Xuint16;
> +typedef u8 Xuint8;
> +
> +/* and signed integer types */
> +typedef s32 Xint32;
> +typedef s16 Xint16;
> +typedef s8 Xint8;
> +
> +#ifndef NULL
> +#define NULL 0
> +#endif
> +
> +typedef unsigned long Xboolean;
> +#define XNULL	NULL
> +
> +#define XTRUE	1
> +#define XFALSE	0
> +
> +/*@}*/
> +
> +/**
> + * This data type defines an interrupt handler for a device.
> + * The argument points to the instance of the component
> + */
> +typedef void (*XInterruptHandler) (void *InstancePtr);
> +
> +/**
> + * This data type defines a callback to be invoked when an
> + * assert occurs. The callback is invoked only when asserts are enabled
> + */
> +typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
> +
> +/***************** Macros (Inline Functions) Definitions *********************/
> +
> +/*****************************************************************************/
> +/**
> +* Return the most significant half of the 64 bit data type.
> +*
> +* @param x is the 64 bit word.
> +*
> +* @return
> +*
> +* The upper 32 bits of the 64 bit word.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XUINT64_MSW(x) ((x).Upper)
> +
> +/*****************************************************************************/
> +/**
> +* Return the least significant half of the 64 bit data type.
> +*
> +* @param x is the 64 bit word.
> +*
> +* @return
> +*
> +* The lower 32 bits of the 64 bit word.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XUINT64_LSW(x) ((x).Lower)
> +
> +#ifndef NDEBUG
> +
> +/*****************************************************************************/
> +/**
> +* This assert macro is to be used for functions that do not return anything
> +* (void). This in conjunction with the XWaitInAssert boolean can be used to
> +* accomodate tests so that asserts which fail allow execution to continue.
> +*
> +* @param expression is the expression to evaluate. If it evaluates to false,
> +*	 the assert occurs.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_VOID(expression)			\
> +{							\
> +	if (expression) {				\
> +		XAssertStatus = XASSERT_NONE;		\
> +	} else {					\
> +		XAssert(__FILE__, __LINE__);		\
> +		XAssertStatus = XASSERT_OCCURRED;	\
> +		return;					\
> +	}						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* This assert macro is to be used for functions that do return a value. This in
> +* conjunction with the XWaitInAssert boolean can be used to accomodate tests so
> +* that asserts which fail allow execution to continue.
> +*
> +* @param expression is the expression to evaluate. If it evaluates to false,
> +*	 the assert occurs.
> +*
> +* @return
> +*
> +* Returns 0 unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_NONVOID(expression)			\
> +{							\
> +	if (expression) {				\
> +		XAssertStatus = XASSERT_NONE;		\
> +	} else {					\
> +		XAssert(__FILE__, __LINE__);		\
> +		XAssertStatus = XASSERT_OCCURRED;	\
> +		return 0;				\
> +	}						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* Always assert. This assert macro is to be used for functions that do not
> +* return anything (void). Use for instances where an assert should always
> +* occur.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_VOID_ALWAYS()				\
> +{							\
> +	XAssert(__FILE__, __LINE__);			\
> +	XAssertStatus = XASSERT_OCCURRED;		\
> +	return;						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* Always assert. This assert macro is to be used for functions that do return
> +* a value. Use for instances where an assert should always occur.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_NONVOID_ALWAYS()			\
> +{							\
> +	XAssert(__FILE__, __LINE__);			\
> +	XAssertStatus = XASSERT_OCCURRED;		\
> +	return 0;					\
> +}
> +
> +#else
> +
> +#define XASSERT_VOID(expression)
> +#define XASSERT_VOID_ALWAYS()
> +#define XASSERT_NONVOID(expression)
> +#define XASSERT_NONVOID_ALWAYS()
> +#endif
> +
> +/************************** Function Prototypes ******************************/
> +
> +void XAssertSetCallback(XAssertCallback Routine);
> +
> +#endif	/* end of protection macro */

And all this stuff is really, really needed in this boot loader ?

Really?

> --- /dev/null
> +++ b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
> @@ -0,0 +1,256 @@
> +/*****************************************************************************
> +*
> +*	XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
> +*	AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
> +*	SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
> +*	OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
> +*	APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
> +*	THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
> +*	AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
> +*	FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
> +*	WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
> +*	IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
> +*	REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
> +*	INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> +*	FOR A PARTICULAR PURPOSE.
> +*
> +*	(c) Copyright 2002 Xilinx Inc.
> +*	All rights reserved.

GPL header missing.

...
> +#define XUL_RX_FIFO_OFFSET		0   /* receive FIFO, read only */
> +#define XUL_TX_FIFO_OFFSET		4   /* transmit FIFO, write only */
> +#define XUL_STATUS_REG_OFFSET		8   /* status register, read only */
> +#define XUL_CONTROL_REG_OFFSET		12  /* control register, write only */

Lines too long. See also rest of your patches!



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
That Microsoft, the Trabant of the operating  system  world,  may  be
glancing  over the Berlin Wall at the Audis and BMWs and Mercedes. In
their own universe Trabants and Ladas were mainstream too...
                                                   -- Evan Leibovitch

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX
  2008-07-10 18:36             ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Wolfgang Denk
@ 2008-07-10 18:45               ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 18:45 UTC (permalink / raw)
  To: u-boot

Hi again

    You are right on all your comments, I am correcting them on my
local copy. Once I receive more comments I will resubmit.

     Thanks and best regards

On Thu, Jul 10, 2008 at 8:36 PM, Wolfgang Denk <wd@denx.de> wrote:
> In message <1215712408-23567-7-git-send-email-ricardo.ribalda@uam.es> you wrote:
>>
>> diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
>> index 4e863dc..d55ce56 100644
>> --- a/cpu/ppc4xx/4xx_enet.c
>> +++ b/cpu/ppc4xx/4xx_enet.c
>> @@ -97,7 +97,7 @@
>>   * network support enabled.
>>   * Remark: CONFIG_405 describes Xilinx PPC405 FPGA without EMAC controller!
>>   */
>> -#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480)
>> +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480) && !defined(CONFIG_440_VIRTEX5)
>
> Line too long.
>
>>  #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
>>  #error "CONFIG_MII has to be defined!"
>> diff --git a/cpu/ppc4xx/4xx_uart.c b/cpu/ppc4xx/4xx_uart.c
>> index a7587d4..e79c48c 100644
>> --- a/cpu/ppc4xx/4xx_uart.c
>> +++ b/cpu/ppc4xx/4xx_uart.c
>> @@ -48,6 +48,7 @@
>>  #include <watchdog.h>
>>  #include <asm/ppc4xx-intvec.h>
>>
>> +#if !defined(CONFIG_440_VIRTEX5)
>>  #ifdef CONFIG_SERIAL_MULTI
>>  #include <serial.h>
>>  #endif
>> @@ -58,6 +59,7 @@
>>
>>  DECLARE_GLOBAL_DATA_PTR;
>>
>> +
>
> Too many empty lines.
>
>>  #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
>>      defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
>>      defined(CONFIG_405EX) || defined(CONFIG_440)
>> @@ -873,3 +875,5 @@ int serial_tstc(void)
>>  #endif /* CONFIG_SERIAL_MULTI */
>>
>>  #endif       /* CONFIG_405GP || CONFIG_405CR */
>> +
>
> Unnecessary empty line.
>
>> +#endif
>> diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c
>> index 39f439d..defbbba 100644
>> --- a/cpu/ppc4xx/cpu.c
>> +++ b/cpu/ppc4xx/cpu.c
>> @@ -508,6 +508,11 @@ int checkcpu (void)
>>               puts("GT Rev. A");
>>               strcpy(addstr, "Security/Kasumi support");
>>               break;
>> +
>> +     case PVR_VIRTEX5:
>> +             printf(" VIRTEX5");
>> +             break;
>> +
>>
>
> Too many empty lines.
>
>> --- a/cpu/ppc4xx/speed.c
>> +++ b/cpu/ppc4xx/speed.c
>> @@ -415,7 +415,7 @@ ulong get_PCI_freq (void)
>>       return sys_info.freqPCI;
>>  }
>>
>> -#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE)
>> +#elif !defined(CONFIG_440GX) && !defined(CONFIG_440SP) && !defined(CONFIG_440SPE) &&!defined(CONFIG_440_VIRTEX5)
>
> Line too long.
>
>> --- a/cpu/ppc4xx/start.S
>> +++ b/cpu/ppc4xx/start.S
>> @@ -367,6 +367,7 @@ skip_debug_init:
>>       /*----------------------------------------------------------------*/
>>       /* Setup interrupt vectors */
>>       /*----------------------------------------------------------------*/
>> +     li      r0,0
>
> Why do you think this was necessary?
>
>> --- a/net/eth.c
>> +++ b/net/eth.c
>> @@ -291,6 +291,7 @@ int eth_initialize(bd_t *bis)
>>       at91sam9_eth_initialize(bis);
>>  #endif
>>
>> +
>
> Too many empoty lines.
>
>>       if (!eth_devices) {
>>               puts ("No ethernet found.\n");
>>               show_boot_progress (-64);
>> @@ -621,7 +622,7 @@ int eth_initialize(bd_t *bis)
>>       at91rm9200_miiphy_initialize(bis);
>>  #endif
>>  #if defined(CONFIG_4xx) && !defined(CONFIG_IOP480) \
>> -     && !defined(CONFIG_AP1000) && !defined(CONFIG_405)
>> +     && !defined(CONFIG_AP1000) && !defined(CONFIG_405) && !defined(CONFIG_440_VIRTEX5)
>
> Line too long.
>
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Some people march to the beat of a different drummer. And some people
> tango!
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 18:41               ` Wolfgang Denk
@ 2008-07-10 18:52                 ` Ricardo Ribalda Delgado
  2008-07-10 19:02                   ` Wolfgang Denk
  2008-07-11  6:57                   ` Michal Simek
  0 siblings, 2 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 18:52 UTC (permalink / raw)
  To: u-boot

Hello again

    This files already exist on the u-boot tree. They are located in
include/asm-microblaze and include/asm-microblaze/arch-microblaze .
They give support to a simple uart which can also be used on the
powerpc, I have just copied them from one directory to another.

    This files have been provided by Xilinx, and they are the same in
all the OS and boot loaders, I don't  think they break any GPL
license,


   Best regards and sorry for the coding style.... I am correcting it.

On Thu, Jul 10, 2008 at 8:41 PM, Wolfgang Denk <wd@denx.de> wrote:
> In message <1215712408-23567-8-git-send-email-ricardo.ribalda@uam.es> you wrote:
>>
>> +*     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 2 of the License, or (at your
>> +*     option) any later version.
> ..
>> +*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
>> +*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
>> +*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
>> +*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
>> +*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
>> +*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
>
> This is IMHO in contradiction to the GPL clause above.
>
>> +*     Xilinx hardware products are not intended for use in life support
>> +*     appliances, devices, or systems. Use in such applications is
>> +*     expressly prohibited.
>
> This restriction is IMHO in contradiction to the GPL clause above.
>
> ..
>> +#define XCOMPONENT_IS_READY  0x11111111      /* component has been initialized */
>> +#define XCOMPONENT_IS_STARTED        0x22222222      /* component has been started */
>
> Lines too long.
>
>> +/* the following constants and declarations are for unit test purposes and are
>> + * designed to be used in test applications.
>> + */
>> +#define XTEST_PASSED 0
>> +#define XTEST_FAILED 1
>> +
>> +#define XASSERT_NONE  0
>> +#define XASSERT_OCCURRED 1
>> +
>> +extern unsigned int XAssertStatus;
>> +extern void XAssert(char *, int);
>> +
>> +/**************************** Type Definitions *******************************/
>> +
>> +/** @name Primitive types
>> + * These primitive types are created for transportability.
>> + * They are dependent upon the target architecture.
>> + * @{
>> + */
>> +#include <linux/types.h>
>> +
>> +typedef struct {
>> +     u32 Upper;
>> +     u32 Lower;
>> +} Xuint64;
>> +
>> +/* Xilinx's unsigned integer types */
>> +typedef u32 Xuint32;
>> +typedef u16 Xuint16;
>> +typedef u8 Xuint8;
>> +
>> +/* and signed integer types */
>> +typedef s32 Xint32;
>> +typedef s16 Xint16;
>> +typedef s8 Xint8;
>> +
>> +#ifndef NULL
>> +#define NULL 0
>> +#endif
>> +
>> +typedef unsigned long Xboolean;
>> +#define XNULL        NULL
>> +
>> +#define XTRUE        1
>> +#define XFALSE       0
>> +
>> +/*@}*/
>> +
>> +/**
>> + * This data type defines an interrupt handler for a device.
>> + * The argument points to the instance of the component
>> + */
>> +typedef void (*XInterruptHandler) (void *InstancePtr);
>> +
>> +/**
>> + * This data type defines a callback to be invoked when an
>> + * assert occurs. The callback is invoked only when asserts are enabled
>> + */
>> +typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
>> +
>> +/***************** Macros (Inline Functions) Definitions *********************/
>> +
>> +/*****************************************************************************/
>> +/**
>> +* Return the most significant half of the 64 bit data type.
>> +*
>> +* @param x is the 64 bit word.
>> +*
>> +* @return
>> +*
>> +* The upper 32 bits of the 64 bit word.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XUINT64_MSW(x) ((x).Upper)
>> +
>> +/*****************************************************************************/
>> +/**
>> +* Return the least significant half of the 64 bit data type.
>> +*
>> +* @param x is the 64 bit word.
>> +*
>> +* @return
>> +*
>> +* The lower 32 bits of the 64 bit word.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XUINT64_LSW(x) ((x).Lower)
>> +
>> +#ifndef NDEBUG
>> +
>> +/*****************************************************************************/
>> +/**
>> +* This assert macro is to be used for functions that do not return anything
>> +* (void). This in conjunction with the XWaitInAssert boolean can be used to
>> +* accomodate tests so that asserts which fail allow execution to continue.
>> +*
>> +* @param expression is the expression to evaluate. If it evaluates to false,
>> +*     the assert occurs.
>> +*
>> +* @return
>> +*
>> +* Returns void unless the XWaitInAssert variable is true, in which case
>> +* no return is made and an infinite loop is entered.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XASSERT_VOID(expression)                     \
>> +{                                                    \
>> +     if (expression) {                               \
>> +             XAssertStatus = XASSERT_NONE;           \
>> +     } else {                                        \
>> +             XAssert(__FILE__, __LINE__);            \
>> +             XAssertStatus = XASSERT_OCCURRED;       \
>> +             return;                                 \
>> +     }                                               \
>> +}
>> +
>> +/*****************************************************************************/
>> +/**
>> +* This assert macro is to be used for functions that do return a value. This in
>> +* conjunction with the XWaitInAssert boolean can be used to accomodate tests so
>> +* that asserts which fail allow execution to continue.
>> +*
>> +* @param expression is the expression to evaluate. If it evaluates to false,
>> +*     the assert occurs.
>> +*
>> +* @return
>> +*
>> +* Returns 0 unless the XWaitInAssert variable is true, in which case
>> +* no return is made and an infinite loop is entered.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XASSERT_NONVOID(expression)                  \
>> +{                                                    \
>> +     if (expression) {                               \
>> +             XAssertStatus = XASSERT_NONE;           \
>> +     } else {                                        \
>> +             XAssert(__FILE__, __LINE__);            \
>> +             XAssertStatus = XASSERT_OCCURRED;       \
>> +             return 0;                               \
>> +     }                                               \
>> +}
>> +
>> +/*****************************************************************************/
>> +/**
>> +* Always assert. This assert macro is to be used for functions that do not
>> +* return anything (void). Use for instances where an assert should always
>> +* occur.
>> +*
>> +* @return
>> +*
>> +* Returns void unless the XWaitInAssert variable is true, in which case
>> +* no return is made and an infinite loop is entered.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XASSERT_VOID_ALWAYS()                                \
>> +{                                                    \
>> +     XAssert(__FILE__, __LINE__);                    \
>> +     XAssertStatus = XASSERT_OCCURRED;               \
>> +     return;                                         \
>> +}
>> +
>> +/*****************************************************************************/
>> +/**
>> +* Always assert. This assert macro is to be used for functions that do return
>> +* a value. Use for instances where an assert should always occur.
>> +*
>> +* @return
>> +*
>> +* Returns void unless the XWaitInAssert variable is true, in which case
>> +* no return is made and an infinite loop is entered.
>> +*
>> +* @note
>> +*
>> +* None.
>> +*
>> +******************************************************************************/
>> +#define XASSERT_NONVOID_ALWAYS()                     \
>> +{                                                    \
>> +     XAssert(__FILE__, __LINE__);                    \
>> +     XAssertStatus = XASSERT_OCCURRED;               \
>> +     return 0;                                       \
>> +}
>> +
>> +#else
>> +
>> +#define XASSERT_VOID(expression)
>> +#define XASSERT_VOID_ALWAYS()
>> +#define XASSERT_NONVOID(expression)
>> +#define XASSERT_NONVOID_ALWAYS()
>> +#endif
>> +
>> +/************************** Function Prototypes ******************************/
>> +
>> +void XAssertSetCallback(XAssertCallback Routine);
>> +
>> +#endif       /* end of protection macro */
>
> And all this stuff is really, really needed in this boot loader ?
>
> Really?
>
>> --- /dev/null
>> +++ b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
>> @@ -0,0 +1,256 @@
>> +/*****************************************************************************
>> +*
>> +*    XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
>> +*    AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
>> +*    SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
>> +*    OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
>> +*    APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
>> +*    THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
>> +*    AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
>> +*    FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
>> +*    WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
>> +*    IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
>> +*    REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
>> +*    INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
>> +*    FOR A PARTICULAR PURPOSE.
>> +*
>> +*    (c) Copyright 2002 Xilinx Inc.
>> +*    All rights reserved.
>
> GPL header missing.
>
> ..
>> +#define XUL_RX_FIFO_OFFSET           0   /* receive FIFO, read only */
>> +#define XUL_TX_FIFO_OFFSET           4   /* transmit FIFO, write only */
>> +#define XUL_STATUS_REG_OFFSET                8   /* status register, read only */
>> +#define XUL_CONTROL_REG_OFFSET               12  /* control register, write only */
>
> Lines too long. See also rest of your patches!
>
>
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> That Microsoft, the Trabant of the operating  system  world,  may  be
> glancing  over the Berlin Wall at the Audis and BMWs and Mercedes. In
> their own universe Trabants and Ladas were mainstream too...
>                                                   -- Evan Leibovitch
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 18:32       ` Ricardo Ribalda Delgado
@ 2008-07-10 18:57         ` Wolfgang Denk
  0 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 18:57 UTC (permalink / raw)
  To: u-boot

In message <aa76a2be0807101132i2256d905vd449a3bea9cbd367@mail.gmail.com> you wrote:
> 
>   I have modified the license of all the patches, and they are now located at:
>      http://www.ii.uam.es/~rribalda/ml507.tgz
>   Waiting for more comments

There will not be any comments from me  this  way.  Please  post  the
pathces on the list.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Now here's something you're really going to like!"
- Rocket J. Squirrel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 18:52                 ` Ricardo Ribalda Delgado
@ 2008-07-10 19:02                   ` Wolfgang Denk
  2008-07-11  6:57                   ` Michal Simek
  1 sibling, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 19:02 UTC (permalink / raw)
  To: u-boot

In message <aa76a2be0807101152w4993ef3ckddec30baf25f72a1@mail.gmail.com> you wrote:
> 
>     This files already exist on the u-boot tree. They are located in
> include/asm-microblaze and include/asm-microblaze/arch-microblaze .
> They give support to a simple uart which can also be used on the
> powerpc, I have just copied them from one directory to another.

That's even worse. Don't do that. NEVER duplicate code.

Software engineering is an art of NOT duplicating previous work or
code.

>     This files have been provided by Xilinx, and they are the same in
> all the OS and boot loaders, I don't  think they break any GPL
> license,

IANAL. Are you a laywer?

> >> +*     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 2 of the License, or (at your
> >> +*     option) any later version.
> > ..
> >> +*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
> >> +*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
> >> +*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
> >> +*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
> >> +*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
> >> +*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
> >
> > This is IMHO in contradiction to the GPL clause above.

If the code is under GPL there should not be any undefined (probably
dangerous?) third party rights. If this should be the case, the file
cannot be released under GPL.

> >> +*     Xilinx hardware products are not intended for use in life support
> >> +*     appliances, devices, or systems. Use in such applications is
> >> +*     expressly prohibited.
> >
> > This restriction is IMHO in contradiction to the GPL clause above.


[BTW: please do not top-post / full-quote.]


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you hear an onion ring, answer it.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
  2008-07-10 18:10   ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Jerry Van Baren
@ 2008-07-10 19:58   ` Wolfgang Denk
  2008-07-10 21:04     ` Ricardo Ribalda Delgado
  2008-07-11  6:49   ` Michal Simek
  3 siblings, 1 reply; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 19:58 UTC (permalink / raw)
  To: u-boot

In message <1215712408-23567-2-git-send-email-ricardo.ribalda@uam.es> you wrote:
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  drivers/hwmon/Makefile  |    1 +
>  drivers/hwmon/adt7460.c |   89 +++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
>  include/dtt.h           |    2 +-
>  4 files changed, 140 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/hwmon/adt7460.c
>  create mode 100644 drivers/hwmon/adt7460.h
> 
> diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
> index 065433a..83aa297 100644
> --- a/drivers/hwmon/Makefile
> +++ b/drivers/hwmon/Makefile
> @@ -34,6 +34,7 @@ COBJS-y += adm1021.o
>  COBJS-y += ds1621.o
>  COBJS-y += ds1722.o
>  COBJS-y += ds1775.o
> +COBJS-y += adt7460.o

Please make this 

   COBJS-$(CONFIG_DTT_ADT7460) += adt7460.o

instead,

>  COBJS-$(CONFIG_DTT_LM73) += lm73.o
>  COBJS-y += lm75.o
>  COBJS-y += lm81.o
> diff --git a/drivers/hwmon/adt7460.c b/drivers/hwmon/adt7460.c
> new file mode 100644
> index 0000000..255d6ed
> --- /dev/null
> +++ b/drivers/hwmon/adt7460.c
> @@ -0,0 +1,89 @@
...
> +#ifdef CONFIG_DTT_ADT7460

...and then drop this #ifdef / #endif 

> +#include <i2c.h>
> +#include <dtt.h>
> +#include "adt7460.h"
> +
> +#define ADT7460_ADDRESS 0x2c
> +
> +
> +int dtt_read(int sensor, int reg)
> +{
> +	u8 dir=reg;
> +	u8 data;
> +
> +	if (-1==i2c_read(ADT7460_ADDRESS,dir,1,&data,1))

Please write

	if (i2c_read(ADT7460_ADDRESS,dir,1,&data,1) == -1)

here and everywhere else.

> +int dtt_write(int sensor, int reg, int val)
> +{
> +	u8 dir=reg;
> +	u8 data=val;
> +	
> +	if (-1==i2c_write(ADT7460_ADDRESS,dir,1,&data,1))
> +		return -1;
> +
> +	return 0;

Maybe this could be simplyfied as

	return i2c_write(ADT7460_ADDRESS,dir,1,&data,1);

?

> +    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.

Please make GPLv2 (or later).

...
> --- a/include/dtt.h
> +++ b/include/dtt.h
> @@ -32,7 +32,7 @@
>      defined(CONFIG_DTT_DS1775) || \
>      defined(CONFIG_DTT_LM81) || \
>      defined(CONFIG_DTT_ADM1021) || \
> -    defined(CONFIG_DTT_LM73)
> +    defined(CONFIG_DTT_LM73)||defined(CONFIG_DTT_ADT7460)

Please split on separate line.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Earth -- mother of the most beautiful women in the universe.
	-- Apollo, "Who Mourns for Adonais?" stardate 3468.1

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
       [not found]     ` <1215712408-23567-4-git-send-email-ricardo.ribalda@uam.es>
  2008-07-10 18:11     ` [U-Boot-Users] [PATCH] I2C Dummy Driver Jerry Van Baren
@ 2008-07-10 20:03     ` Wolfgang Denk
  2008-07-10 21:02       ` Ricardo Ribalda Delgado
  2008-07-11  9:03       ` Andre Schwarz
  2008-07-11  6:30     ` Michal Simek
  3 siblings, 2 replies; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-10 20:03 UTC (permalink / raw)
  To: u-boot

In message <1215712408-23567-3-git-send-email-ricardo.ribalda@uam.es> you wrote:
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

What is the intention or practical use of this dummy driver?


> --- 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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Plan to throw one away.  You will anyway."
                              - Fred Brooks, "The Mythical Man Month"

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 20:03     ` Wolfgang Denk
@ 2008-07-10 21:02       ` Ricardo Ribalda Delgado
  2008-07-11  6:59         ` Michal Simek
  2008-07-11  9:03       ` Andre Schwarz
  1 sibling, 1 reply; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 21:02 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang

> What is the intention or practical use of this dummy driver?


  I developed this driver for two reasons,

     I wanted a dummy driver to test the i2c subsystem
     I wanted a way of use the ddr2 autoconfiguration for ppc440 without i2c.


>
>> +#if defined(CONFIG_DUMMY_I2C)
>> +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?

It is the identification data of my ddr2 memory.



I will redo this patch and sent it again if you consider it useful for
the mainline.


     Best Regards and thanks for your comments


> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "Plan to throw one away.  You will anyway."
>                              - Fred Brooks, "The Mythical Man Month"
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 19:58   ` Wolfgang Denk
@ 2008-07-10 21:04     ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 26+ messages in thread
From: Ricardo Ribalda Delgado @ 2008-07-10 21:04 UTC (permalink / raw)
  To: u-boot

Hello


  All the comments are right, I will resend it tomorrow.


       Best regards and thanks

>
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Earth -- mother of the most beautiful women in the universe.
>        -- Apollo, "Who Mourns for Adonais?" stardate 3468.1
>



-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
                       ` (2 preceding siblings ...)
  2008-07-10 20:03     ` Wolfgang Denk
@ 2008-07-11  6:30     ` Michal Simek
  3 siblings, 0 replies; 26+ messages in thread
From: Michal Simek @ 2008-07-11  6:30 UTC (permalink / raw)
  To: u-boot

Clean coding style. http://www.denx.de/wiki/UBoot/CodingStyle


> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  drivers/i2c/Makefile    |    1 +
>  drivers/i2c/dummy_i2c.c |   84 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 85 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/i2c/dummy_i2c.c
> 
> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
> index 534c015..322c822 100644
> --- a/drivers/i2c/Makefile
> +++ b/drivers/i2c/Makefile
> @@ -30,6 +30,7 @@ COBJS-y += omap1510_i2c.o
>  COBJS-y += omap24xx_i2c.o
>  COBJS-y += tsi108_i2c.o
>  COBJS-y += mxc_i2c.o
> +COBJS-y += dummy_i2c.o
>  
>  COBJS	:= $(COBJS-y)
>  SRCS	:= $(COBJS:.o=.c)
> 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
> +    This work has been supported by: Q-Technology  http://qtec.com/
> +
> +    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.
> +
> +    This program is distributed in the hope that it will be useful,
> +    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +    GNU General Public License for more details.
> +
> +    You should have received a copy of the GNU General Public License
> +    along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +*/
> +
> +#include <common.h>
> +
> +#if defined(CONFIG_DUMMY_I2C)
> +
> +
> +#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};
> +	
> +
> +
> +void i2c_init(int speed, int slaveaddr){
> +	return ;
> +}
> +
> +
> +
> +int
> +i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len)
> +{
> +	int i;
> +	if (alen!=1)
> +		return -1;
> +
> +	if (addr+len>0xff)
> +		return -1;
> +
> +	for(i=0;i<len;i++){
> +		buffer[i]=i2c_dummy_buffer[i+addr];
> +	}
> +
> +	return 0;
> +
> +
> +}
> +
> +
> +int
> +i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len)
> +{
> +	int i;
> +	if (alen!=1)
> +		return -1;
> +	if (addr+len>0xff)
> +		return -1;
> +
> +	for(i=0;i<len;i++){
> +		i2c_dummy_buffer[i+addr]=buffer[i];
> +	}
> +
> +	return 0;
> +}
> +
> +
> +int
> +i2c_probe(uchar chip)
> +{
> +	return 0;
> +}
> +
> +
> +
> +
> +
> +#endif
> +

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 17:53             ` [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx Ricardo Ribalda Delgado
  2008-07-10 18:41               ` Wolfgang Denk
@ 2008-07-11  6:30               ` Michal Simek
  2008-07-11  7:12                 ` Wolfgang Denk
  1 sibling, 1 reply; 26+ messages in thread
From: Michal Simek @ 2008-07-11  6:30 UTC (permalink / raw)
  To: u-boot

100% NACK.


> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  include/asm-ppc/arch-ppc4xx/xbasic_types.h |  301 ++++++++++++++++++++++++++++
>  include/asm-ppc/arch-ppc4xx/xio.h          |   63 ++++++
>  include/asm-ppc/arch-ppc4xx/xuartlite_l.h  |  256 +++++++++++++++++++++++
>  include/asm-ppc/serial_xuartlite.h         |   25 +++
>  4 files changed, 645 insertions(+), 0 deletions(-)
>  create mode 100644 include/asm-ppc/arch-ppc4xx/xbasic_types.h
>  create mode 100644 include/asm-ppc/arch-ppc4xx/xio.h
>  create mode 100644 include/asm-ppc/arch-ppc4xx/xuartlite_l.h
>  create mode 100644 include/asm-ppc/serial_xuartlite.h
> 
> diff --git a/include/asm-ppc/arch-ppc4xx/xbasic_types.h b/include/asm-ppc/arch-ppc4xx/xbasic_types.h
> new file mode 100644
> index 0000000..25012e6
> --- /dev/null
> +++ b/include/asm-ppc/arch-ppc4xx/xbasic_types.h
> @@ -0,0 +1,301 @@
> +/******************************************************************************
> +*
> +*     Author: Xilinx, Inc.
> +*
> +*
> +*     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 2 of the License, or (at your
> +*     option) any later version.
> +*
> +*
> +*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
> +*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
> +*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
> +*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
> +*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
> +*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
> +*     XILINX EXPRESSLY DISCLAIMS ANY WARRANTY WHATSOEVER WITH RESPECT TO
> +*     THE ADEQUACY OF THE IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY
> +*     WARRANTIES OR REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM
> +*     CLAIMS OF INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND
> +*     FITNESS FOR A PARTICULAR PURPOSE.
> +*
> +*
> +*     Xilinx hardware products are not intended for use in life support
> +*     appliances, devices, or systems. Use in such applications is
> +*     expressly prohibited.
> +*
> +*
> +*     (c) Copyright 2002-2003 Xilinx Inc.
> +*     All rights reserved.
> +*
> +*
> +*     You should have received a copy of the GNU General Public License along
> +*     with this program; if not, write to the Free Software Foundation, Inc.,
> +*     675 Mass Ave, Cambridge, MA 02139, USA.
> +*
> +******************************************************************************/
> +/*****************************************************************************/
> +/**
> +*
> +* @file xbasic_types.h
> +*
> +* This file contains basic types for Xilinx software IP.  These types do not
> +* follow the standard naming convention with respect to using the component
> +* name in front of each name because they are considered to be primitives.
> +*
> +* @note
> +*
> +* This file contains items which are architecture dependent.
> +*
> +* <pre>
> +* MODIFICATION HISTORY:
> +*
> +* Ver	 Who	Date	Changes
> +* ----- ---- -------- -----------------------------------------------
> +* 1.00a rmm  12/14/01 First release
> +*	rmm  05/09/03 Added "xassert always" macros to rid ourselves of diab
> +*		      compiler warnings
> +* </pre>
> +*
> +******************************************************************************/
> +
> +#ifndef XBASIC_TYPES_H		/* prevent circular inclusions */
> +#define XBASIC_TYPES_H		/* by using protection macros */
> +
> +/***************************** Include Files *********************************/
> +
> +/************************** Constant Definitions *****************************/
> +
> +#ifndef TRUE
> +#define TRUE 1
> +#endif
> +#ifndef FALSE
> +#define FALSE 0
> +#endif
> +
> +#ifndef NULL
> +#define NULL 0
> +#endif
> +/** Null */
> +
> +#define XCOMPONENT_IS_READY	0x11111111	/* component has been initialized */
> +#define XCOMPONENT_IS_STARTED	0x22222222	/* component has been started */
> +
> +/* the following constants and declarations are for unit test purposes and are
> + * designed to be used in test applications.
> + */
> +#define XTEST_PASSED	0
> +#define XTEST_FAILED	1
> +
> +#define XASSERT_NONE	 0
> +#define XASSERT_OCCURRED 1
> +
> +extern unsigned int XAssertStatus;
> +extern void XAssert(char *, int);
> +
> +/**************************** Type Definitions *******************************/
> +
> +/** @name Primitive types
> + * These primitive types are created for transportability.
> + * They are dependent upon the target architecture.
> + * @{
> + */
> +#include <linux/types.h>
> +
> +typedef struct {
> +	u32 Upper;
> +	u32 Lower;
> +} Xuint64;
> +
> +/* Xilinx's unsigned integer types */
> +typedef u32 Xuint32;
> +typedef u16 Xuint16;
> +typedef u8 Xuint8;
> +
> +/* and signed integer types */
> +typedef s32 Xint32;
> +typedef s16 Xint16;
> +typedef s8 Xint8;
> +
> +#ifndef NULL
> +#define NULL 0
> +#endif
> +
> +typedef unsigned long Xboolean;
> +#define XNULL	NULL
> +
> +#define XTRUE	1
> +#define XFALSE	0
> +
> +/*@}*/
> +
> +/**
> + * This data type defines an interrupt handler for a device.
> + * The argument points to the instance of the component
> + */
> +typedef void (*XInterruptHandler) (void *InstancePtr);
> +
> +/**
> + * This data type defines a callback to be invoked when an
> + * assert occurs. The callback is invoked only when asserts are enabled
> + */
> +typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
> +
> +/***************** Macros (Inline Functions) Definitions *********************/
> +
> +/*****************************************************************************/
> +/**
> +* Return the most significant half of the 64 bit data type.
> +*
> +* @param x is the 64 bit word.
> +*
> +* @return
> +*
> +* The upper 32 bits of the 64 bit word.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XUINT64_MSW(x) ((x).Upper)
> +
> +/*****************************************************************************/
> +/**
> +* Return the least significant half of the 64 bit data type.
> +*
> +* @param x is the 64 bit word.
> +*
> +* @return
> +*
> +* The lower 32 bits of the 64 bit word.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XUINT64_LSW(x) ((x).Lower)
> +
> +#ifndef NDEBUG
> +
> +/*****************************************************************************/
> +/**
> +* This assert macro is to be used for functions that do not return anything
> +* (void). This in conjunction with the XWaitInAssert boolean can be used to
> +* accomodate tests so that asserts which fail allow execution to continue.
> +*
> +* @param expression is the expression to evaluate. If it evaluates to false,
> +*	 the assert occurs.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_VOID(expression)			\
> +{							\
> +	if (expression) {				\
> +		XAssertStatus = XASSERT_NONE;		\
> +	} else {					\
> +		XAssert(__FILE__, __LINE__);		\
> +		XAssertStatus = XASSERT_OCCURRED;	\
> +		return;					\
> +	}						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* This assert macro is to be used for functions that do return a value. This in
> +* conjunction with the XWaitInAssert boolean can be used to accomodate tests so
> +* that asserts which fail allow execution to continue.
> +*
> +* @param expression is the expression to evaluate. If it evaluates to false,
> +*	 the assert occurs.
> +*
> +* @return
> +*
> +* Returns 0 unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_NONVOID(expression)			\
> +{							\
> +	if (expression) {				\
> +		XAssertStatus = XASSERT_NONE;		\
> +	} else {					\
> +		XAssert(__FILE__, __LINE__);		\
> +		XAssertStatus = XASSERT_OCCURRED;	\
> +		return 0;				\
> +	}						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* Always assert. This assert macro is to be used for functions that do not
> +* return anything (void). Use for instances where an assert should always
> +* occur.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_VOID_ALWAYS()				\
> +{							\
> +	XAssert(__FILE__, __LINE__);			\
> +	XAssertStatus = XASSERT_OCCURRED;		\
> +	return;						\
> +}
> +
> +/*****************************************************************************/
> +/**
> +* Always assert. This assert macro is to be used for functions that do return
> +* a value. Use for instances where an assert should always occur.
> +*
> +* @return
> +*
> +* Returns void unless the XWaitInAssert variable is true, in which case
> +* no return is made and an infinite loop is entered.
> +*
> +* @note
> +*
> +* None.
> +*
> +******************************************************************************/
> +#define XASSERT_NONVOID_ALWAYS()			\
> +{							\
> +	XAssert(__FILE__, __LINE__);			\
> +	XAssertStatus = XASSERT_OCCURRED;		\
> +	return 0;					\
> +}
> +
> +#else
> +
> +#define XASSERT_VOID(expression)
> +#define XASSERT_VOID_ALWAYS()
> +#define XASSERT_NONVOID(expression)
> +#define XASSERT_NONVOID_ALWAYS()
> +#endif
> +
> +/************************** Function Prototypes ******************************/
> +
> +void XAssertSetCallback(XAssertCallback Routine);
> +
> +#endif	/* end of protection macro */
> diff --git a/include/asm-ppc/arch-ppc4xx/xio.h b/include/asm-ppc/arch-ppc4xx/xio.h
> new file mode 100644
> index 0000000..7eed327
> --- /dev/null
> +++ b/include/asm-ppc/arch-ppc4xx/xio.h
> @@ -0,0 +1,63 @@
> +/*
> + * xio.h
> + *
> + * Defines XIo functions for Xilinx OCP in terms of Linux primitives
> + *
> + * Author: MontaVista Software, Inc.
> + *         source at mvista.com
> + *
> + * 2002 (c) MontaVista, Software, Inc.  This file is licensed under the terms
> + * of the GNU General Public License version 2.  This program is licensed
> + * "as is" without any warranty of any kind, whether express or implied.
> + */
> +
> +#ifndef XIO_H
> +#define XIO_H
> +
> +#include "xbasic_types.h"
> +#include <asm/io.h>
> +
> +typedef u32 XIo_Address;
> +
> +extern inline u8
> +XIo_In8(XIo_Address InAddress)
> +{
> +	return (u8) in_8((volatile unsigned char *) InAddress);
> +}
> +extern inline u16
> +XIo_In16(XIo_Address InAddress)
> +{
> +	return (u16) in_be16((volatile unsigned short *) InAddress);
> +}
> +extern inline u32
> +XIo_In32(XIo_Address InAddress)
> +{
> +	return (u32) in_be32((volatile unsigned *) InAddress);
> +}
> +extern inline void
> +XIo_Out8(XIo_Address OutAddress, u8 Value)
> +{
> +	out_8((volatile unsigned char *) OutAddress, Value);
> +}
> +extern inline void
> +XIo_Out16(XIo_Address OutAddress, u16 Value)
> +{
> +	out_be16((volatile unsigned short *) OutAddress, Value);
> +}
> +extern inline void
> +XIo_Out32(XIo_Address OutAddress, u32 Value)
> +{
> +	out_be32((volatile unsigned *) OutAddress, Value);
> +}
> +
> +#define XIo_ToLittleEndian16(s,d) (*(u16*)(d) = cpu_to_le16((u16)(s)))
> +#define XIo_ToLittleEndian32(s,d) (*(u32*)(d) = cpu_to_le32((u32)(s)))
> +#define XIo_ToBigEndian16(s,d) (*(u16*)(d) = cpu_to_be16((u16)(s)))
> +#define XIo_ToBigEndian32(s,d) (*(u32*)(d) = cpu_to_be32((u32)(s)))
> +
> +#define XIo_FromLittleEndian16(s,d) (*(u16*)(d) = le16_to_cpu((u16)(s)))
> +#define XIo_FromLittleEndian32(s,d) (*(u32*)(d) = le32_to_cpu((u32)(s)))
> +#define XIo_FromBigEndian16(s,d) (*(u16*)(d) = be16_to_cpu((u16)(s)))
> +#define XIo_FromBigEndian32(s,d) (*(u32*)(d) = be32_to_cpu((u32)(s)))
> +
> +#endif				/* XIO_H */
> diff --git a/include/asm-ppc/arch-ppc4xx/xuartlite_l.h b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
> new file mode 100644
> index 0000000..b381a0d
> --- /dev/null
> +++ b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
> @@ -0,0 +1,256 @@
> +/*****************************************************************************
> +*
> +*	XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
> +*	AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
> +*	SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
> +*	OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
> +*	APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
> +*	THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
> +*	AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
> +*	FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
> +*	WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
> +*	IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
> +*	REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
> +*	INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> +*	FOR A PARTICULAR PURPOSE.
> +*
> +*	(c) Copyright 2002 Xilinx Inc.
> +*	All rights reserved.
> +*
> +*****************************************************************************/
> +/****************************************************************************/
> +/**
> +*
> +* @file xuartlite_l.h
> +*
> +* This header file contains identifiers and low-level driver functions (or
> +* macros) that can be used to access the device.  High-level driver functions
> +* are defined in xuartlite.h.
> +*
> +* <pre>
> +* MODIFICATION HISTORY:
> +*
> +* Ver	Who  Date     Changes
> +* ----- ---- -------- -----------------------------------------------
> +* 1.00b rpm  04/25/02 First release
> +* </pre>
> +*
> +*****************************************************************************/
> +
> +#ifndef XUARTLITE_L_H /* prevent circular inclusions */
> +#define XUARTLITE_L_H /* by using protection macros */
> +
> +/***************************** Include Files ********************************/
> +
> +#include "xbasic_types.h"
> +#include "xio.h"
> +
> +/************************** Constant Definitions ****************************/
> +
> +/* UART Lite register offsets */
> +
> +#define XUL_RX_FIFO_OFFSET		0   /* receive FIFO, read only */
> +#define XUL_TX_FIFO_OFFSET		4   /* transmit FIFO, write only */
> +#define XUL_STATUS_REG_OFFSET		8   /* status register, read only */
> +#define XUL_CONTROL_REG_OFFSET		12  /* control register, write only */
> +
> +/* control register bit positions */
> +
> +#define XUL_CR_ENABLE_INTR		0x10	/* enable interrupt */
> +#define XUL_CR_FIFO_RX_RESET		0x02	/* reset receive FIFO */
> +#define XUL_CR_FIFO_TX_RESET		0x01	/* reset transmit FIFO */
> +
> +/* status register bit positions */
> +
> +#define XUL_SR_PARITY_ERROR		0x80
> +#define XUL_SR_FRAMING_ERROR		0x40
> +#define XUL_SR_OVERRUN_ERROR		0x20
> +#define XUL_SR_INTR_ENABLED		0x10	/* interrupt enabled */
> +#define XUL_SR_TX_FIFO_FULL		0x08	/* transmit FIFO full */
> +#define XUL_SR_TX_FIFO_EMPTY		0x04	/* transmit FIFO empty */
> +#define XUL_SR_RX_FIFO_FULL		0x02	/* receive FIFO full */
> +#define XUL_SR_RX_FIFO_VALID_DATA	0x01	/* data in receive FIFO */
> +
> +/* the following constant specifies the size of the FIFOs, the size of the
> + * FIFOs includes the transmitter and receiver such that it is the total number
> + * of bytes that the UART can buffer
> + */
> +#define XUL_FIFO_SIZE		    16
> +
> +/* Stop bits are fixed at 1. Baud, parity, and data bits are fixed on a
> + * per instance basis
> + */
> +#define XUL_STOP_BITS		    1
> +
> +/* Parity definitions
> + */
> +#define XUL_PARITY_NONE		    0
> +#define XUL_PARITY_ODD		    1
> +#define XUL_PARITY_EVEN		    2
> +
> +/**************************** Type Definitions ******************************/
> +
> +/***************** Macros (Inline Functions) Definitions ********************/
> +
> +/*****************************************************************************
> +*
> +* Low-level driver macros and functions. The list below provides signatures
> +* to help the user use the macros.
> +*
> +* void XUartLite_mSetControlReg(u32 BaseAddress, u32 Mask)
> +* u32 XUartLite_mGetControlReg(u32 BaseAddress)
> +* u32 XUartLite_mGetStatusReg(u32 BaseAddress)
> +*
> +* Xboolean XUartLite_mIsReceiveEmpty(u32 BaseAddress)
> +* Xboolean XUartLite_mIsTransmitFull(u32 BaseAddress)
> +* Xboolean XUartLite_mIsIntrEnabled(u32 BaseAddress)
> +*
> +* void XUartLite_mEnableIntr(u32 BaseAddress)
> +* void XUartLite_mDisableIntr(u32 BaseAddress)
> +*
> +* void XUartLite_SendByte(u32 BaseAddress, u8 Data);
> +* u8 XUartLite_RecvByte(u32 BaseAddress);
> +*
> +*****************************************************************************/
> +
> +/****************************************************************************/
> +/**
> +*
> +* Set the contents of the control register. Use the XUL_CR_* constants defined
> +* above to create the bit-mask to be written to the register.
> +*
> +* @param    BaseAddress is the base address of the device
> +* @param    Mask is the 32-bit value to write to the control register
> +*
> +* @return   None.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mSetControlReg(BaseAddress, Mask) \
> +		    XIo_Out32((BaseAddress) + XUL_CONTROL_REG_OFFSET, (Mask))
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Get the contents of the control register. Use the XUL_CR_* constants defined
> +* above to interpret the bit-mask returned.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   A 32-bit value representing the contents of the control register.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mGetControlReg(BaseAddress) \
> +		    XIo_In32((BaseAddress) + XUL_CONTROL_REG_OFFSET)
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Get the contents of the status register. Use the XUL_SR_* constants defined
> +* above to interpret the bit-mask returned.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   A 32-bit value representing the contents of the status register.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mGetStatusReg(BaseAddress) \
> +		    XIo_In32((BaseAddress) + XUL_STATUS_REG_OFFSET)
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Check to see if the receiver has data.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   XTRUE if the receiver is empty, XFALSE if there is data present.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mIsReceiveEmpty(BaseAddress) \
> +	  (!(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_RX_FIFO_VALID_DATA))
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Check to see if the transmitter is full.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   XTRUE if the transmitter is full, XFALSE otherwise.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mIsTransmitFull(BaseAddress) \
> +		(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_TX_FIFO_FULL)
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Check to see if the interrupt is enabled.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   XTRUE if the interrupt is enabled, XFALSE otherwise.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mIsIntrEnabled(BaseAddress) \
> +		(XUartLite_mGetStatusReg((BaseAddress)) & XUL_SR_INTR_ENABLED)
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Enable the device interrupt. Preserve the contents of the control register.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   None.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mEnableIntr(BaseAddress) \
> +	       XUartLite_mSetControlReg((BaseAddress), \
> +		   XUartLite_mGetControlReg((BaseAddress)) | XUL_CR_ENABLE_INTR)
> +
> +
> +/****************************************************************************/
> +/**
> +*
> +* Disable the device interrupt. Preserve the contents of the control register.
> +*
> +* @param    BaseAddress is the	base address of the device
> +*
> +* @return   None.
> +*
> +* @note	    None.
> +*
> +*****************************************************************************/
> +#define XUartLite_mDisableIntr(BaseAddress) \
> +	      XUartLite_mSetControlReg((BaseAddress), \
> +		  XUartLite_mGetControlReg((BaseAddress)) & ~XUL_CR_ENABLE_INTR)
> +
> +
> +/************************** Function Prototypes *****************************/
> +
> +void XUartLite_SendByte(u32 BaseAddress, u8 Data);
> +u8 XUartLite_RecvByte(u32 BaseAddress);
> +
> +
> +#endif		  /* end of protection macro */
> diff --git a/include/asm-ppc/serial_xuartlite.h b/include/asm-ppc/serial_xuartlite.h
> new file mode 100644
> index 0000000..6cd1e83
> --- /dev/null
> +++ b/include/asm-ppc/serial_xuartlite.h
> @@ -0,0 +1,25 @@
> +/*
> + * (C) Copyright 2004 Atmark Techno, Inc.
> + *
> + * Yasushi SHOJI <yashi@atmark-techno.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * 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 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <asm/arch/xuartlite_l.h>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip
  2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
                     ` (2 preceding siblings ...)
  2008-07-10 19:58   ` Wolfgang Denk
@ 2008-07-11  6:49   ` Michal Simek
  3 siblings, 0 replies; 26+ messages in thread
From: Michal Simek @ 2008-07-11  6:49 UTC (permalink / raw)
  To: u-boot


Clean coding style especially long lines, free lines and please choose only one
email address.

Michal

> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> ---
>  drivers/hwmon/Makefile  |    1 +
>  drivers/hwmon/adt7460.c |   89 +++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/hwmon/adt7460.h |   49 ++++++++++++++++++++++++++
>  include/dtt.h           |    2 +-
>  4 files changed, 140 insertions(+), 1 deletions(-)
>  create mode 100644 drivers/hwmon/adt7460.c
>  create mode 100644 drivers/hwmon/adt7460.h
> 
> diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
> index 065433a..83aa297 100644
> --- a/drivers/hwmon/Makefile
> +++ b/drivers/hwmon/Makefile
> @@ -34,6 +34,7 @@ COBJS-y += adm1021.o
>  COBJS-y += ds1621.o
>  COBJS-y += ds1722.o
>  COBJS-y += ds1775.o
> +COBJS-y += adt7460.o

look at line below to proper style.

>  COBJS-$(CONFIG_DTT_LM73) += lm73.o


>  COBJS-y += lm75.o
>  COBJS-y += lm81.o
> diff --git a/drivers/hwmon/adt7460.c b/drivers/hwmon/adt7460.c
> new file mode 100644
> index 0000000..255d6ed
> --- /dev/null
> +++ b/drivers/hwmon/adt7460.c
> @@ -0,0 +1,89 @@
> +/*   
> +    (C) Copyright 2008
> +    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
long line

> +    This work has been supported by: Q-Technology  http://qtec.com/
> +
> +    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.
> +
> +    This program is distributed in the hope that it will be useful,
> +    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +    GNU General Public License for more details.
> +
> +    You should have received a copy of the GNU General Public License
> +    along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +*/
> +
> +#include <common.h>
> +
> +#ifdef CONFIG_DTT_ADT7460

why is this ifdef here?

> +
> +#include <i2c.h>
> +#include <dtt.h>
> +#include "adt7460.h"
> +
> +#define ADT7460_ADDRESS 0x2c
> +
> +
> +int dtt_read(int sensor, int reg)
> +{
> +	u8 dir=reg;
> +	u8 data;
> +
> +	if (-1==i2c_read(ADT7460_ADDRESS,dir,1,&data,1))
> +		return -1;
> +	
> +	if (data==ADT7460_INVALID)
> +		return -1;
> +
> +	return data;
> +
> +} 
> +
> +
> +int dtt_write(int sensor, int reg, int val)
> +{
> +	u8 dir=reg;
> +	u8 data=val;
> +	
> +	if (-1==i2c_write(ADT7460_ADDRESS,dir,1,&data,1))
> +		return -1;
> +
> +	return 0;
> +} 
> +
> +
> +
> +int dtt_init (void)
> +{
> +	printf("ADT7460 at I2C address 0x%2x\n",ADT7460_ADDRESS);
> +	if (-1==dtt_write(0,ADT7460_CONFIG,1)){
> +		printf("Error initialiting ADT7460\n");
> +		return -1;
> +	}
> +	return 0;
> +} 
> +
> +
> +int dtt_get_temp(int sensor)
> +{
> +	int aux;
> +	u8 table[]={ADT7460_REM1_TEMP,ADT7460_LOCAL_TEMP,ADT7460_REM2_TEMP};
> +	if (sensor>2){
> +		printf("DTT sensor does not exist\n");
> +		return -1;
> +	}
> +	
> +	aux=dtt_read(0,table[sensor]);
> +
> +	if (-1==aux){
> +		printf("DTT temperature read failed\n");
> +		return -1;
> +
> +	}
> +	return aux;
> +}
> +#endif 
> diff --git a/drivers/hwmon/adt7460.h b/drivers/hwmon/adt7460.h
> new file mode 100644
> index 0000000..48666f7
> --- /dev/null
> +++ b/drivers/hwmon/adt7460.h
> @@ -0,0 +1,49 @@
> +/*   
> +    (C) Copyright 2008
> +    Ricado Ribalda, Universidad Autonoma de Madrid, ricardo.ribalda<at>uam.es , ricardo.ribalda<at>gmail.com
> +    This work has been supported by: Q-Technology  http://qtec.com/    
> +
> +    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.
> +
> +    This program is distributed in the hope that it will be useful,
> +    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +    GNU General Public License for more details.
> +
> +    You should have received a copy of the GNU General Public License
> +    along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +*/
> +#ifndef ADT7460
> +#define ADT7460
> +
> +
> +#define ADT7460_INVALID 128
> +
> +#define ADT7460_2_5V		0x20
> +#define ADT7460_VCCP		0x21
> +#define ADT7460_VCC		0x22
> +#define ADT7460_V5		0x23
> +#define ADT7460_V12		0x24
> +#define ADT7460_REM1_TEMP	0x25
> +#define ADT7460_LOCAL_TEMP	0x26
> +#define ADT7460_REM2_TEMP	0x27
> +#define ADT7460_TACH1L		0x28
> +#define ADT7460_TACH1H		0x29
> +#define ADT7460_TACH2L		0x2a
> +#define ADT7460_TACH2H		0x2b
> +#define ADT7460_TACH3L		0x2c
> +#define ADT7460_TACH3H		0x2d
> +#define ADT7460_TACH4L		0x2e
> +#define ADT7460_TACH4H		0x2f
> +#define ADT7460_TACH5L		0xa9
> +#define ADT7460_TACH5H		0xaa
> +#define ADT7460_TACH6L		0xab
> +#define ADT7460_TACH6H		0xac
> +#define ADT7460_REVISION	0x3f
> +#define ADT7460_CONFIG		0x40
> +
> +
> +#endif
> diff --git a/include/dtt.h b/include/dtt.h
> index 4e8aaad..73d7547 100644
> --- a/include/dtt.h
> +++ b/include/dtt.h
> @@ -32,7 +32,7 @@
>      defined(CONFIG_DTT_DS1775) || \
>      defined(CONFIG_DTT_LM81) || \
>      defined(CONFIG_DTT_ADM1021) || \
> -    defined(CONFIG_DTT_LM73)
> +    defined(CONFIG_DTT_LM73)||defined(CONFIG_DTT_ADT7460)

follow the same style
>  
>  #define CONFIG_DTT				/* We have a DTT */
>  

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-10 18:52                 ` Ricardo Ribalda Delgado
  2008-07-10 19:02                   ` Wolfgang Denk
@ 2008-07-11  6:57                   ` Michal Simek
  1 sibling, 0 replies; 26+ messages in thread
From: Michal Simek @ 2008-07-11  6:57 UTC (permalink / raw)
  To: u-boot


Hi Wolfgang and Ricardo,

> Hello again
> 
>     This files already exist on the u-boot tree. They are located in
> include/asm-microblaze and include/asm-microblaze/arch-microblaze .
> They give support to a simple uart which can also be used on the
> powerpc, I have just copied them from one directory to another.

These files are ancient and they are added 4 years ago. I'll look at it if they
are use anywhere.

BTW in next merge open window I want to remove big bunch of code relate with
xilinx generic driver.

Michal


>     This files have been provided by Xilinx, and they are the same in
> all the OS and boot loaders, I don't  think they break any GPL
> license,
> 
> 
>    Best regards and sorry for the coding style.... I am correcting it.
> 
> On Thu, Jul 10, 2008 at 8:41 PM, Wolfgang Denk <wd@denx.de> wrote:
>> In message <1215712408-23567-8-git-send-email-ricardo.ribalda@uam.es> you wrote:
>>> +*     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 2 of the License, or (at your
>>> +*     option) any later version.
>> ..
>>> +*     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" AS A
>>> +*     COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR INFORMATION AS
>>> +*     ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION OR STANDARD,
>>> +*     XILINX IS MAKING NO REPRESENTATION THAT THIS IMPLEMENTATION IS FREE
>>> +*     FROM ANY CLAIMS OF INFRINGEMENT, AND YOU ARE RESPONSIBLE FOR OBTAINING
>>> +*     ANY THIRD PARTY RIGHTS YOU MAY REQUIRE FOR YOUR IMPLEMENTATION.
>> This is IMHO in contradiction to the GPL clause above.
>>
>>> +*     Xilinx hardware products are not intended for use in life support
>>> +*     appliances, devices, or systems. Use in such applications is
>>> +*     expressly prohibited.
>> This restriction is IMHO in contradiction to the GPL clause above.
>>
>> ..
>>> +#define XCOMPONENT_IS_READY  0x11111111      /* component has been initialized */
>>> +#define XCOMPONENT_IS_STARTED        0x22222222      /* component has been started */
>> Lines too long.
>>
>>> +/* the following constants and declarations are for unit test purposes and are
>>> + * designed to be used in test applications.
>>> + */
>>> +#define XTEST_PASSED 0
>>> +#define XTEST_FAILED 1
>>> +
>>> +#define XASSERT_NONE  0
>>> +#define XASSERT_OCCURRED 1
>>> +
>>> +extern unsigned int XAssertStatus;
>>> +extern void XAssert(char *, int);
>>> +
>>> +/**************************** Type Definitions *******************************/
>>> +
>>> +/** @name Primitive types
>>> + * These primitive types are created for transportability.
>>> + * They are dependent upon the target architecture.
>>> + * @{
>>> + */
>>> +#include <linux/types.h>
>>> +
>>> +typedef struct {
>>> +     u32 Upper;
>>> +     u32 Lower;
>>> +} Xuint64;
>>> +
>>> +/* Xilinx's unsigned integer types */
>>> +typedef u32 Xuint32;
>>> +typedef u16 Xuint16;
>>> +typedef u8 Xuint8;
>>> +
>>> +/* and signed integer types */
>>> +typedef s32 Xint32;
>>> +typedef s16 Xint16;
>>> +typedef s8 Xint8;
>>> +
>>> +#ifndef NULL
>>> +#define NULL 0
>>> +#endif
>>> +
>>> +typedef unsigned long Xboolean;
>>> +#define XNULL        NULL
>>> +
>>> +#define XTRUE        1
>>> +#define XFALSE       0
>>> +
>>> +/*@}*/
>>> +
>>> +/**
>>> + * This data type defines an interrupt handler for a device.
>>> + * The argument points to the instance of the component
>>> + */
>>> +typedef void (*XInterruptHandler) (void *InstancePtr);
>>> +
>>> +/**
>>> + * This data type defines a callback to be invoked when an
>>> + * assert occurs. The callback is invoked only when asserts are enabled
>>> + */
>>> +typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
>>> +
>>> +/***************** Macros (Inline Functions) Definitions *********************/
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* Return the most significant half of the 64 bit data type.
>>> +*
>>> +* @param x is the 64 bit word.
>>> +*
>>> +* @return
>>> +*
>>> +* The upper 32 bits of the 64 bit word.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XUINT64_MSW(x) ((x).Upper)
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* Return the least significant half of the 64 bit data type.
>>> +*
>>> +* @param x is the 64 bit word.
>>> +*
>>> +* @return
>>> +*
>>> +* The lower 32 bits of the 64 bit word.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XUINT64_LSW(x) ((x).Lower)
>>> +
>>> +#ifndef NDEBUG
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* This assert macro is to be used for functions that do not return anything
>>> +* (void). This in conjunction with the XWaitInAssert boolean can be used to
>>> +* accomodate tests so that asserts which fail allow execution to continue.
>>> +*
>>> +* @param expression is the expression to evaluate. If it evaluates to false,
>>> +*     the assert occurs.
>>> +*
>>> +* @return
>>> +*
>>> +* Returns void unless the XWaitInAssert variable is true, in which case
>>> +* no return is made and an infinite loop is entered.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XASSERT_VOID(expression)                     \
>>> +{                                                    \
>>> +     if (expression) {                               \
>>> +             XAssertStatus = XASSERT_NONE;           \
>>> +     } else {                                        \
>>> +             XAssert(__FILE__, __LINE__);            \
>>> +             XAssertStatus = XASSERT_OCCURRED;       \
>>> +             return;                                 \
>>> +     }                                               \
>>> +}
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* This assert macro is to be used for functions that do return a value. This in
>>> +* conjunction with the XWaitInAssert boolean can be used to accomodate tests so
>>> +* that asserts which fail allow execution to continue.
>>> +*
>>> +* @param expression is the expression to evaluate. If it evaluates to false,
>>> +*     the assert occurs.
>>> +*
>>> +* @return
>>> +*
>>> +* Returns 0 unless the XWaitInAssert variable is true, in which case
>>> +* no return is made and an infinite loop is entered.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XASSERT_NONVOID(expression)                  \
>>> +{                                                    \
>>> +     if (expression) {                               \
>>> +             XAssertStatus = XASSERT_NONE;           \
>>> +     } else {                                        \
>>> +             XAssert(__FILE__, __LINE__);            \
>>> +             XAssertStatus = XASSERT_OCCURRED;       \
>>> +             return 0;                               \
>>> +     }                                               \
>>> +}
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* Always assert. This assert macro is to be used for functions that do not
>>> +* return anything (void). Use for instances where an assert should always
>>> +* occur.
>>> +*
>>> +* @return
>>> +*
>>> +* Returns void unless the XWaitInAssert variable is true, in which case
>>> +* no return is made and an infinite loop is entered.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XASSERT_VOID_ALWAYS()                                \
>>> +{                                                    \
>>> +     XAssert(__FILE__, __LINE__);                    \
>>> +     XAssertStatus = XASSERT_OCCURRED;               \
>>> +     return;                                         \
>>> +}
>>> +
>>> +/*****************************************************************************/
>>> +/**
>>> +* Always assert. This assert macro is to be used for functions that do return
>>> +* a value. Use for instances where an assert should always occur.
>>> +*
>>> +* @return
>>> +*
>>> +* Returns void unless the XWaitInAssert variable is true, in which case
>>> +* no return is made and an infinite loop is entered.
>>> +*
>>> +* @note
>>> +*
>>> +* None.
>>> +*
>>> +******************************************************************************/
>>> +#define XASSERT_NONVOID_ALWAYS()                     \
>>> +{                                                    \
>>> +     XAssert(__FILE__, __LINE__);                    \
>>> +     XAssertStatus = XASSERT_OCCURRED;               \
>>> +     return 0;                                       \
>>> +}
>>> +
>>> +#else
>>> +
>>> +#define XASSERT_VOID(expression)
>>> +#define XASSERT_VOID_ALWAYS()
>>> +#define XASSERT_NONVOID(expression)
>>> +#define XASSERT_NONVOID_ALWAYS()
>>> +#endif
>>> +
>>> +/************************** Function Prototypes ******************************/
>>> +
>>> +void XAssertSetCallback(XAssertCallback Routine);
>>> +
>>> +#endif       /* end of protection macro */
>> And all this stuff is really, really needed in this boot loader ?
>>
>> Really?
>>
>>> --- /dev/null
>>> +++ b/include/asm-ppc/arch-ppc4xx/xuartlite_l.h
>>> @@ -0,0 +1,256 @@
>>> +/*****************************************************************************
>>> +*
>>> +*    XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"
>>> +*    AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND
>>> +*    SOLUTIONS FOR XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE,
>>> +*    OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE,
>>> +*    APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION
>>> +*    THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,
>>> +*    AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE
>>> +*    FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY
>>> +*    WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE
>>> +*    IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR
>>> +*    REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF
>>> +*    INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
>>> +*    FOR A PARTICULAR PURPOSE.
>>> +*
>>> +*    (c) Copyright 2002 Xilinx Inc.
>>> +*    All rights reserved.
>> GPL header missing.
>>
>> ..
>>> +#define XUL_RX_FIFO_OFFSET           0   /* receive FIFO, read only */
>>> +#define XUL_TX_FIFO_OFFSET           4   /* transmit FIFO, write only */
>>> +#define XUL_STATUS_REG_OFFSET                8   /* status register, read only */
>>> +#define XUL_CONTROL_REG_OFFSET               12  /* control register, write only */
>> Lines too long. See also rest of your patches!
>>
>>
>>
>> Best regards,
>>
>> Wolfgang Denk
>>
>> --
>> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>> That Microsoft, the Trabant of the operating  system  world,  may  be
>> glancing  over the Berlin Wall at the Audis and BMWs and Mercedes. In
>> their own universe Trabants and Ladas were mainstream too...
>>                                                   -- Evan Leibovitch
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 21:02       ` Ricardo Ribalda Delgado
@ 2008-07-11  6:59         ` Michal Simek
  0 siblings, 0 replies; 26+ messages in thread
From: Michal Simek @ 2008-07-11  6:59 UTC (permalink / raw)
  To: u-boot

Hi Ricardo,


> Hi Wolfgang
> 
>> What is the intention or practical use of this dummy driver?
> 
> 
>   I developed this driver for two reasons,
> 
>      I wanted a dummy driver to test the i2c subsystem
>      I wanted a way of use the ddr2 autoconfiguration for ppc440 without i2c.
> 
> 
>>> +#if defined(CONFIG_DUMMY_I2C)
>>> +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?
> 
> It is the identification data of my ddr2 memory.

I think you will have to recoded it for better understanding.

M




> I will redo this patch and sent it again if you consider it useful for
> the mainline.
> 
> 
>      Best Regards and thanks for your comments
> 
> 
>> --
>> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>> "Plan to throw one away.  You will anyway."
>>                              - Fred Brooks, "The Mythical Man Month"
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx
  2008-07-11  6:30               ` Michal Simek
@ 2008-07-11  7:12                 ` Wolfgang Denk
  0 siblings, 0 replies; 26+ messages in thread
From: Wolfgang Denk @ 2008-07-11  7:12 UTC (permalink / raw)
  To: u-boot

In message <4876FE1E.6030200@seznam.cz> you wrote:
> 100% NACK.
> 
> 
> > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
> > ---
> >  include/asm-ppc/arch-ppc4xx/xbasic_types.h |  301 ++++++++++++++++++++++++++++
> >  include/asm-ppc/arch-ppc4xx/xio.h          |   63 ++++++
> >  include/asm-ppc/arch-ppc4xx/xuartlite_l.h  |  256 +++++++++++++++++++++++
> >  include/asm-ppc/serial_xuartlite.h         |   25 +++
> >  4 files changed, 645 insertions(+), 0 deletions(-)
> >  create mode 100644 include/asm-ppc/arch-ppc4xx/xbasic_types.h
> >  create mode 100644 include/asm-ppc/arch-ppc4xx/xio.h
> >  create mode 100644 include/asm-ppc/arch-ppc4xx/xuartlite_l.h
> >  create mode 100644 include/asm-ppc/serial_xuartlite.h
...

There is no need for a full quote when you add just asingle line of
message text.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
IMPORTANT NOTICE TO PURCHASERS: The Entire Physical Universe,  Inclu-
ding  This Product, May One Day Collapse Back into an Infinitesimally
Small Space. Should  Another  Universe  Subsequently  Re-emerge,  the
Existence of This Product in That Universe Cannot Be Guaranteed.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [U-Boot-Users] [PATCH] I2C Dummy Driver
  2008-07-10 20:03     ` Wolfgang Denk
  2008-07-10 21:02       ` Ricardo Ribalda Delgado
@ 2008-07-11  9:03       ` Andre Schwarz
  1 sibling, 0 replies; 26+ messages in thread
From: Andre Schwarz @ 2008-07-11  9:03 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk schrieb:
> In message <1215712408-23567-3-git-send-email-ricardo.ribalda@uam.es> you wrote:
>   
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
>>     
>
> 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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-07-11  9:03 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 17:53 [U-Boot-Users] Support for the ML507 Xilinx Board Ricardo Ribalda Delgado
2008-07-10 17:53 ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Ricardo Ribalda Delgado
2008-07-10 17:53   ` [U-Boot-Users] [PATCH] I2C Dummy Driver Ricardo Ribalda Delgado
     [not found]     ` <1215712408-23567-4-git-send-email-ricardo.ribalda@uam.es>
     [not found]       ` <1215712408-23567-5-git-send-email-ricardo.ribalda@uam.es>
     [not found]         ` <1215712408-23567-6-git-send-email-ricardo.ribalda@uam.es>
2008-07-10 17:53           ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Ricardo Ribalda Delgado
2008-07-10 17:53             ` [U-Boot-Users] [PATCH] Adds support for Xilinx Uart Lite on ppc4xx Ricardo Ribalda Delgado
2008-07-10 18:41               ` Wolfgang Denk
2008-07-10 18:52                 ` Ricardo Ribalda Delgado
2008-07-10 19:02                   ` Wolfgang Denk
2008-07-11  6:57                   ` Michal Simek
2008-07-11  6:30               ` Michal Simek
2008-07-11  7:12                 ` Wolfgang Denk
2008-07-10 18:36             ` [U-Boot-Users] [PATCH] Adds support for the PPC440x5 Processor on Virtex5 FX Wolfgang Denk
2008-07-10 18:45               ` Ricardo Ribalda Delgado
2008-07-10 18:11     ` [U-Boot-Users] [PATCH] I2C Dummy Driver Jerry Van Baren
2008-07-10 20:03     ` Wolfgang Denk
2008-07-10 21:02       ` Ricardo Ribalda Delgado
2008-07-11  6:59         ` Michal Simek
2008-07-11  9:03       ` Andre Schwarz
2008-07-11  6:30     ` Michal Simek
2008-07-10 18:10   ` [U-Boot-Users] [PATCH] -Support fot the ADT7640 Monitor chip Jerry Van Baren
2008-07-10 18:16     ` Ricardo Ribalda Delgado
2008-07-10 18:32       ` Ricardo Ribalda Delgado
2008-07-10 18:57         ` Wolfgang Denk
2008-07-10 19:58   ` Wolfgang Denk
2008-07-10 21:04     ` Ricardo Ribalda Delgado
2008-07-11  6:49   ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox