Re: [U-Boot] [PATCH] [for next] i2c, ppc4xx: fix compiling KAREF and METROBOX boards.
Hello Wolfgang, Wolfgang Denk wrote: In message 200912031154.39962...@denx.de you wrote: The board maintainer, Travis Sawyer, doesn't work for Sandburst (acquired by Broadcom some time ago?) any more. So we can't get his comments on this. Not sure what to do with those Sandburst boards now. They are not actively maintained any more. Perhaps we should remove them some time soon? Wolfgang, what do you think? Should we try to carry such unmaintained boards on for ever? If it's an easy change to do (say, up to 5 minutes work to make it compile) I suggest we clean it up and keep the code. If it starts making real efforts we can remove it, if nobody complains. Thats exactly, what my patch did ;-) Stefan, would you pick it up? bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Removes dead code in the file common/cmd_i2c.c
Hello Wolfgang, Wolfgang Denk wrote: In message 4b175f3f.2060...@denx.de you wrote: Applied, thanks. Heiko, I hope this is OK with you. Hmm.. not really, my last comment on this was: Ouch, sorry. No probelm. http://lists.denx.de/pipermail/u-boot/2009-November/064245.html I missed that, sorry. This was in another thread, not connected with the patch. I don;t know, if this was ever used, but we should make this as a CONFIG option, like CONFIG_SYS_I2C_CMD_MW_WITH_PROBE. What do you suggest? Shall I revert the patch, or can you provide a new commit to re-add this feature? [But then, it would be unused code, which we don't want to add, right?] I actually vote for removing the code, so I sent soon a patch, which fixes the comment. bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] i2c: fix dangling comment in do_i2c_mw()
commit bd3784df94bfeca43fbf34094df9cb1bd3ecca3b delete some unused code in do_i2c_mw(), but missed to fix the inherent commment. This patch fix this comment. Signed-off-by: Heiko Schocher h...@denx.de --- common/cmd_i2c.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c index 8d6feda..62cbd33 100644 --- a/common/cmd_i2c.c +++ b/common/cmd_i2c.c @@ -315,10 +315,6 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* * Wait for the write to complete. The write can take * up to 10mSec (we allow a little more time). -* -* On some chips, while the write is in progress, the -* chip doesn't respond. This apparently isn't a -* universal feature so we don't take advantage of it. */ /* * No write delay with FRAM devices. -- 1.6.2.5 -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Machine check exception on video driver initialization
Hi Stefan, I am getting Machine check exception when my video driver is initializing. When i searched the net i found that you also faced the same kind of problem. I have mentioned the VIDEO_IO_OFFSET as 0xf000. This address is nothing but CONFIG_SYS_PCI1_IO_VIRT which is mentioned on my config file. Here the log of my output. ### U-Boot 2009.06 (Dec 05 2009 - 12:06:50) Data Patterns DPVPX0689 SBC COTS Module CPU: 8641, Version: 2.1, (0x80900021) Core: E600 Core 0, Version: 2.2, (0x80040202) Clock Configuration: CPU:800 MHz, MPX:400 MHz DDR:200 MHz (400 MT/s data rate), LBC:25 MHz L1:D-cache 32 KB enabled I-cache 32 KB enabled L2:1024 KB enabled Board: DPVPX0689 SBC I2C: ready DRAM: DDR: 1 GB Now running in RAM - U-Boot at: 3fe7 FLASH: 64 MB *** Warning - bad CRC, using default environment PCI-EXPRESS 1: Host 0xf6008020=0x ...PCIE LTSSM=0x16, Negotiated link width=8 Scanning PCI bus 01 03 00 1000 0057 0100 00 02 01 10b5 8648 0604 00 06 00 1002 4c66 0300 ff 05 01 10b5 6540 0604 00 04 00 12d8 e130 0604 00 02 02 10b5 8648 0604 00 02 04 10b5 8648 0604 00 09 01 1131 1561 0c03 00 09 01 1131 1561 0c03 00 09 01 1131 1562 0c03 00 08 00 12d8 e130 0604 00 02 05 10b5 8648 0604 00 0a 00 12d8 e130 0604 00 02 06 10b5 8648 0604 00 02 08 10b5 8648 0604 00 02 09 10b5 8648 0604 00 02 0a 10b5 8648 0604 00 02 0b 10b5 8648 0604 00 01 00 10b5 8648 0604 00 PCI-EXPRESS 1 on bus 00 - 0f SRIO: Disabled Video: ATI Radeon video card (1002, 4c66) found @(6:0:0) rinfo-mmio_base = 0x5000 rinfo-fb_local_base = 0xefc0 videoboot: Booting PCI video card bus 6, function 0, device 0 Machine check in kernel mode. Caused by (from msr): regs 3fa6dba8 MSS error. MSSSR0: 1000 NIP: 3FE81E1C XER: 2000 LR: 3FE81D14 REGS: 3fa6dba8 TRAP: 0200 DAR: MSR: 00101030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11 GPR00: 3FA6DC98 3FA6DF68 03BA 0005 3FA6DCB4 0001 GPR08: 0006 F3BA 3FEE5900 3FF7 GPR16: FFBF FFBF7BFF FFEB DFFF 1032 0001 3FE722C4 GPR24: 3FEFC468 3FEFC468 3FEFC468 3FEFC468 3FEDE704 3FEFC468 3FEE6058 03BA Call backtrace: 3FE82CCC 3FE900E4 3FE82AF8 3FE80EEC 3FE78998 3FE78DAC 3FE78E88 3FECD684 3FECD730 3FECC290 3FECC434 3FEB36E8 3FE7BDE8 3FE72560 machine check Resetting board Thanks. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 0/9] display and keypad support for nhk8815
This patch series is very similar to V2 I sent on Nov 25th, only 2/9 and 9/9 are different. Changes from V2: * the clcd driver using a C structure instead of numeric defines for register offsets. Renamed previous clcdc_regs to clcd_config, since regs is now the hardware-description structure. * added address field to clcd_config, so clcd.c doesn't include anithing specific to Nomadik and can be use unchanged by other clcd-equipped SoCs. ps: Wolfgang: while I understand patches must be posted, I offered to avoid extra traffic if it was only a matter of removing printf. Won't do that again, lesson learnt. Alessandro Rubini (9): nhk8815: change the order of initialization video: add amba-clcd prime-cell include/nomadik.h: add physical address for cldc drivers/misc: add stmpe2401 port extender and keypad controller nhk8815.h: define we need stmpe lcd: make 16bpp work nhk8815: added keypad nhk8815: start lower in RAM, so the 800x480 frame buffer fits nhk8815: added lcd support board/st/nhk8815/Makefile |6 +- board/st/nhk8815/config.mk |8 +- board/st/nhk8815/keypad.c | 99 +++ board/st/nhk8815/lcd.c | 88 + board/st/nhk8815/nhk8815-devices.h |8 ++ board/st/nhk8815/nhk8815.c | 38 +-- common/lcd.c | 27 - drivers/misc/Makefile |1 + drivers/misc/stmpe2401.c | 191 drivers/video/Makefile |1 + drivers/video/amba.c | 79 +++ include/amba_clcd.h| 77 +++ include/configs/nhk8815.h | 20 - include/nomadik.h |1 + include/stmpe2401.h| 66 15 files changed, 687 insertions(+), 23 deletions(-) create mode 100644 board/st/nhk8815/keypad.c create mode 100644 board/st/nhk8815/lcd.c create mode 100644 board/st/nhk8815/nhk8815-devices.h create mode 100644 drivers/misc/stmpe2401.c create mode 100644 drivers/video/amba.c create mode 100644 include/amba_clcd.h create mode 100644 include/stmpe2401.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 1/9] nhk8815: change the order of initialization
From: Alessandro Rubini rub...@unipv.it Some inizialization was in board_late_init(), but to satisfy drivers added in the next patches must be performed in normal board_init. This patch leaves board_late_init() empty, but later patches fill it. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/nhk8815.c | 31 +-- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/board/st/nhk8815/nhk8815.c b/board/st/nhk8815/nhk8815.c index faef810..eadce40 100644 --- a/board/st/nhk8815/nhk8815.c +++ b/board/st/nhk8815/nhk8815.c @@ -60,22 +60,26 @@ int board_init(void) writel(0x02100551, NOMADIK_FSMC_BASE + 0x04); /* FSMC_BTR0 */ icache_enable(); - return 0; -} -int board_late_init(void) -{ + /* +* Configure I2C pins, as we will use I2C in a later commit +*/ + /* Set the two I2C gpio lines to be gpio high */ nmk_gpio_set(__SCL, 1); nmk_gpio_set(__SDA, 1); nmk_gpio_dir(__SCL, 1); nmk_gpio_dir(__SDA, 1); nmk_gpio_af(__SCL, GPIO_GPIO); nmk_gpio_af(__SDA, GPIO_GPIO); - /* Reset the I2C port expander, on GPIO77 */ - nmk_gpio_af(77, GPIO_GPIO); - nmk_gpio_dir(77, 1); - nmk_gpio_set(77, 0); - udelay(10); - nmk_gpio_set(77, 1); + /* Put the two I2C port expanders out of reset, on GPIO77 and 79 */ + { + int n[2]={77, 79}; + int i; + for (i = 0; i ARRAY_SIZE(n); i++) { + nmk_gpio_af(n[i], GPIO_GPIO); + nmk_gpio_dir(n[i], 1); + nmk_gpio_set(n[i], 1); + } + } return 0; } @@ -101,3 +105,10 @@ int board_eth_init(bd_t *bis) return rc; } #endif + +/* Initialization callback, from lib_arm/board.c */ +int board_late_init(void) +{ + return 0; +} + -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 2/9] video: add amba-clcd prime-cell
From: Alessandro Rubini rub...@unipv.it This adds support for the CLCD logic cell. It accepts precompiled register values for specific configuration through a board-supplied data structure. It is used by the Nomadik nhk8815, added by a later patch in this series. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- drivers/video/Makefile |1 + drivers/video/amba.c | 79 include/amba_clcd.h| 77 ++ 3 files changed, 157 insertions(+), 0 deletions(-) create mode 100644 drivers/video/amba.c create mode 100644 include/amba_clcd.h diff --git a/drivers/video/Makefile b/drivers/video/Makefile index bb6b5a0..a5e339a 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -29,6 +29,7 @@ COBJS-$(CONFIG_ATI_RADEON_FB) += ati_radeon_fb.o COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o COBJS-$(CONFIG_CFB_CONSOLE) += cfb_console.o COBJS-$(CONFIG_S6E63D6) += s6e63d6.o +COBJS-$(CONFIG_VIDEO_AMBA) += amba.o COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o diff --git a/drivers/video/amba.c b/drivers/video/amba.c new file mode 100644 index 000..ffa1c39 --- /dev/null +++ b/drivers/video/amba.c @@ -0,0 +1,79 @@ +/* + * Driver for AMBA PrimeCell CLCD + * + * Copyright (C) 2009 Alessandro Rubini + * + * 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 common.h +#include asm/io.h +#include lcd.h +#include amba_clcd.h + +/* These variables are required by lcd.c -- although it sets them by itself */ +int lcd_line_length; +int lcd_color_fg; +int lcd_color_bg; +void *lcd_base; +void *lcd_console_address; +short console_col; +short console_row; + +/* + * To use this driver you need to provide the following in board files: + * a panel_info definition + * an lcd_enable function (can't define a weak default with current code) + */ + +/* There is nothing to do with color registers, we use true color */ +void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue) +{ + return; +} + +/* Low level initialization of the logic cell: depends on panel_info */ +void lcd_ctrl_init(void *lcdbase) +{ + struct clcd_config *config; + struct clcd_registers *regs; + u32 cntl; + + config = panel_info.priv; + regs = config-address; + cntl = config-cntl ~CNTL_LCDEN; + + /* Lazily, just copy the registers over: first control with disable */ + writel(cntl, regs-cntl); + + writel(config-tim0, regs-tim0); + writel(config-tim1, regs-tim1); + writel(config-tim2, regs-tim2); + writel(config-tim3, regs-tim3); + writel((u32)lcdbase, regs-ubas); + /* finally, enable */ + writel(cntl | CNTL_LCDEN, regs-cntl); +} + +/* This is trivial, and copied from atmel_lcdfb.c */ +ulong calc_fbsize(void) +{ + return ((panel_info.vl_col * panel_info.vl_row * + NBITS(panel_info.vl_bpix)) / 8) + PAGE_SIZE; +} diff --git a/include/amba_clcd.h b/include/amba_clcd.h new file mode 100644 index 000..db80517 --- /dev/null +++ b/include/amba_clcd.h @@ -0,0 +1,77 @@ +/* + * Register definitions for the AMBA CLCD logic cell. + * + * derived from David A Rusling, although rearranged as a C structure + * linux/include/asm-arm/hardware/amba_clcd.h -- Integrator LCD panel. + * + * Copyright (C) 2001 ARM Limited + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +/* + * CLCD Controller Internal Register addresses + */ +struct clcd_registers { + u32 tim0; /* 0x00 */ + u32 tim1; + u32 tim2; + u32 tim3; + u32 ubas; /* 0x10 */ + u32 lbas; +#if !defined(CONFIG_ARCH_VERSATILE) !defined(CONFIG_ARCH_REALVIEW) + u32 ienb; + u32 cntl; +#else /* Someone rearranged these two registers on the Versatile */ + u32 cntl; + u32 ienb; +#endif + u32 stat; /* 0x20 */ + u32 intr; + u32 ucur; + u32 lcur; + u32 unused[0x74];
[U-Boot] [PATCH V3 3/9] include/nomadik.h: add physical address for cldc
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- include/nomadik.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/nomadik.h b/include/nomadik.h index d9405fd..ea65b2d 100644 --- a/include/nomadik.h +++ b/include/nomadik.h @@ -4,6 +4,7 @@ #define __NOMADIK_H__ /* Base addresses of our peripherals */ +#define NOMADIK_CLCDC_BASE 0x1012 /* CLCD Controller */ #define NOMADIK_SRC_BASE 0x101E /* System and Reset Cnt */ #define NOMADIK_PMU_BASE 0x101E9000 /* Power Management Unit */ #define NOMADIK_MPMC_BASE 0x1011 /* SDRAM Controller */ -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 4/9] drivers/misc: add stmpe2401 port extender and keypad controller
From: Alessandro Rubini rub...@unipv.it This driver is an i2c device acting as a port extender. Since the keypad can be configured to act on specific row and column lines, the specific setup is passed by the board file. This is used by the Nomadik nhk8815, through a later patch in this series. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- drivers/misc/Makefile|1 + drivers/misc/stmpe2401.c | 191 ++ include/stmpe2401.h | 66 3 files changed, 258 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/stmpe2401.c create mode 100644 include/stmpe2401.h diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index f6df60f..76c009a 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -30,6 +30,7 @@ COBJS-$(CONFIG_DS4510) += ds4510.o COBJS-$(CONFIG_FSL_LAW) += fsl_law.o COBJS-$(CONFIG_NS87308) += ns87308.o COBJS-$(CONFIG_STATUS_LED) += status_led.o +COBJS-$(CONFIG_STMPE2401) += stmpe2401.o COBJS-$(CONFIG_TWL4030_LED) += twl4030_led.o COBJS := $(COBJS-y) diff --git a/drivers/misc/stmpe2401.c b/drivers/misc/stmpe2401.c new file mode 100644 index 000..f347d07 --- /dev/null +++ b/drivers/misc/stmpe2401.c @@ -0,0 +1,191 @@ +/* + * board/st/nhk8815/egpio.c: extended gpio as found on nhk8815 board + * + * Copyright 2009 Alessandro Rubini rub...@unipv.it + * + * 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 common.h +#include i2c.h +#include stmpe2401.h + +/* + * First, an interface to set and read registers, used in this file as well + */ +int pe_getreg(int addr, int reg) +{ + unsigned char val8 = reg; + int ret; + + ret = i2c_read(addr, reg, 1 /* len */, val8, 1); + if (ret 0) + return ret; + return val8; +} + +int pe_setreg(int addr, int reg, int val) +{ + unsigned char val8 = val; + + return i2c_write(addr, reg, 1, val8, 1); +} + +/* + * Generic higher-level GPIO interface + */ +int pe_gpio_af(int addr, int pin, int af) +{ + int regval; + + regval = pe_getreg(addr, PE_GPIO_AFR(pin)); + if (regval 0) + return regval; + regval = ~PE_GPIO_AF_MASK(pin); + regval |= af PE_GPIO_AF_SHIFT(pin); + return pe_setreg(addr, PE_GPIO_AFR(pin), regval); +} + +int pe_gpio_dir(int addr, int pin, int dir) +{ + int regval; + + /* 0 == input, 1 == output */ + regval = pe_getreg(addr, PE_GPIO_GPDR(pin)); + if (regval 0) + return regval; + regval = ~PE_GPIO_MASK(pin); + if (dir) + regval |= PE_GPIO_MASK(pin); + return pe_setreg(addr, PE_GPIO_GPDR(pin), regval); +} + +int pe_gpio_pud(int addr, int pin, int pu, int pd) +{ + int regval, mask = PE_GPIO_MASK(pin); + + /* change pullup */ + regval = pe_getreg(addr, PE_GPIO_GPPUR(pin)); + if (regval 0) + return regval; + if (pu) + regval |= mask; + else + regval = ~mask; + regval = pe_setreg(addr, PE_GPIO_GPPUR(pin), regval); + if (regval 0) + return regval; + + /* change pulldown */ + regval = pe_getreg(addr, PE_GPIO_GPPDR(pin)); + if (regval 0) + return regval; + if (pu) + regval |= mask; + else + regval = ~mask; + regval = pe_setreg(addr, PE_GPIO_GPPDR(pin), regval); + if (regval 0) + return regval; + + return 0; +} + +int pe_gpio_set(int addr, int pin, int val) +{ + int reg; + + if (val) + reg = PE_GPIO_GPSR(pin); + else + reg = PE_GPIO_GPCR(pin); + + return pe_setreg(addr, reg, PE_GPIO_MASK(pin)); +} + +int pe_gpio_get(int addr, int pin) +{ + int regval; + + regval = pe_getreg(addr, PE_GPIO_GPMR(pin)); + if (regval 0) + return regval; + return (regval PE_GPIO_MASK(pin)) ? 1 : 0; +} + +/* + * Generic higher-level keypad interface: we have 12 rows out, 8 columns in + */ +int pe_kpc_init(int addr, int rowmask, int colmask, int debounce_ms) +{ + int i; + /* note that gpio15
[U-Boot] [PATCH V3 5/9] nhk8815.h: define we need stmpe
From: Alessandro Rubini rub...@unipv.it Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- include/configs/nhk8815.h |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index a00c2fb..e1be45b 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -110,7 +110,7 @@ #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 } #define CONFIG_PL011_CLOCK 4800 -/* i2c, for the port extenders (uses gpio.c in board directory) */ +/* i2c, for the stmpe2401 port extenders (uses gpio.c in board directory) */ #ifndef __ASSEMBLY__ #include asm/arch/gpio.h #define CONFIG_CMD_I2C @@ -126,6 +126,11 @@ #define I2C_DELAY (udelay(2)) #endif /* __ASSEMBLY__ */ +/* Activate port extenders and define their i2c address */ +#define CONFIG_STMPE2401 +#define STMPE0 0x43 +#define STMPE1 0x44 + /* Ethernet */ #define PCI_MEMORY_VADDR 0xe800 #define PCI_IO_VADDR 0xee00 -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 6/9] lcd: make 16bpp work
From: Alessandro Rubini rub...@unipv.it Support for 16bpp was supposed to be in the code but was not working. This makes it work and has been tested in the nhk8815 board. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- common/lcd.c | 27 +-- 1 files changed, 21 insertions(+), 6 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 4e31618..3d9bfdf 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -63,7 +63,7 @@ // #ifdef CONFIG_LCD_LOGO # include bmp_logo.h /* Get logo data, width and height */ -# if (CONSOLE_COLOR_WHITE = BMP_LOGO_OFFSET) +# if (CONSOLE_COLOR_WHITE = BMP_LOGO_OFFSET) (LCD_BPP != LCD_COLOR16) # error Default Color Map overlaps with Logo Color Map # endif #endif @@ -218,8 +218,12 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count) for (row=0; row VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) { uchar *s = str; - uchar *d = dest; int i; +#if LCD_BPP == LCD_COLOR16 + ushort *d = (ushort *)dest; +#else + uchar *d = dest; +#endif #if LCD_BPP == LCD_MONOCHROME uchar rest = *d -(1 (8-off)); @@ -244,9 +248,8 @@ static void lcd_drawchars (ushort x, ushort y, uchar *str, int count) bits = 1; } #elif LCD_BPP == LCD_COLOR16 - for (c=0; c16; ++c) { - *d++ = (bits 0x80) ? - lcd_color_fg : lcd_color_bg; + for (c=0; c8; ++c) { + *d++ = (bits 0x80) ? 0x : 0; bits = 1; } #endif @@ -529,6 +532,13 @@ void bitmap_plot (int x, int y) cmap = (ushort *)(cp-lcd_cmap[BMP_LOGO_OFFSET*sizeof(ushort)]); #elif defined(CONFIG_ATMEL_LCD) cmap = (uint *) (panel_info.mmio + ATMEL_LCDC_LUT(0)); +#else + /* +* default case: generic system with no cmap (most likely 16bpp) +* We set cmap to the source palette, so no change is done. +* This avoids even more ifdef in the next stanza +*/ + cmap = bmp_logo_palette; #endif WATCHDOG_RESET(); @@ -567,10 +577,15 @@ void bitmap_plot (int x, int y) } } else { /* true color mode */ + u16 col16; fb16 = (ushort *)(lcd_base + y * lcd_line_length + x); for (i=0; iBMP_LOGO_HEIGHT; ++i) { for (j=0; jBMP_LOGO_WIDTH; j++) { - fb16[j] = bmp_logo_palette[(bmap[j])]; + col16 = bmp_logo_palette[(bmap[j]-16)]; + fb16[j] = + ((col16 0x000F) 1) | + ((col16 0x00F0) 3) | + ((col16 0x0F00) 4); } bmap += BMP_LOGO_WIDTH; fb16 += panel_info.vl_col; -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 7/9] nhk8815: added keypad
From: Alessandro Rubini rub...@unipv.it This patch adds keypad support for the nhk8815 board, based on the stmpe2401 driver. The keypad hosts 16 keys, so each of them sends a string instead of a single key. The provided keymap is only an example and must be customized according to the use case. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/Makefile |5 ++- board/st/nhk8815/keypad.c | 99 board/st/nhk8815/nhk8815-devices.h |7 +++ board/st/nhk8815/nhk8815.c |4 ++ include/configs/nhk8815.h |3 + 5 files changed, 117 insertions(+), 1 deletions(-) create mode 100644 board/st/nhk8815/keypad.c create mode 100644 board/st/nhk8815/nhk8815-devices.h diff --git a/board/st/nhk8815/Makefile b/board/st/nhk8815/Makefile index b37fe53..1bb1d2c 100644 --- a/board/st/nhk8815/Makefile +++ b/board/st/nhk8815/Makefile @@ -29,7 +29,10 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS := nhk8815.o +COBJS-y:= nhk8815.o +COBJS-$(CONFIG_NHK8815_KEYPAD) += keypad.o + +COBJS := $(COBJS-y) SOBJS := platform.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/board/st/nhk8815/keypad.c b/board/st/nhk8815/keypad.c new file mode 100644 index 000..4bbcce6 --- /dev/null +++ b/board/st/nhk8815/keypad.c @@ -0,0 +1,99 @@ +/* + * board/st/nhk8815/keypad.c: keypad on nhk8815 board, based on STMPE2401 + * + * Copyright 2009 Alessandro Rubini rub...@unipv.it + * + * 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 common.h +#include stdio_dev.h +#include i2c.h +#include stmpe2401.h + +/* + * Keymap for our 4x4 matrix: since we have just + * a few keys, use a string for each of the keys. + */ +static char *keymap[4][4] = { + {, back, ffw, left}, + {, tvout, playpause, right}, + {vol-, lock, rew, up}, + {vol+, start, ok, down} +}; + +/* this keeps track of the string being returned */ +static char *nextchar = ; + +/* This getc can return failure, not permitted in the caller */ +static int __nhk8815_getc(void) +{ + int row, col, res; + + res = pe_kpc_getkey(STMPE0, row, col); + if (res 0) + return res; /* invalid */ + nextchar = keymap[row][col]; + return 0; +} + +/* This is low level: may not report a valid key (a release, for example) */ +static int __nhk8815_tstc(void) +{ + /* the interrupt is active low */ + int gpio = nmk_gpio_get(76); + return !gpio; +} + +/* This is the one that is being called, it reads the pending string */ +static int nhk8815_tstc(void) +{ + if (*nextchar) /* there's already data */ + return 1; + if (!__nhk8815_tstc()) /* no new data? */ + return 0; + __nhk8815_getc(); /* get (or not) new data */ + return (nextchar[0] != '\0'); +} + +/* So this is only called when there is data in the currenct string */ +static int nhk8815_getc(void) +{ + return *(nextchar++); +} + +/* called from late init */ +int nhk8815_keypad_init(void) +{ + struct stdio_dev dev; + + /* The keypad is on EXP0, columns 0..3, rows 0..3 */ + pe_kpc_init(STMPE0, 0x0f, 0x0f, 30 /* ms */); + + /* Keypad interrupt: GPIO76 */ + nmk_gpio_af(76, GPIO_GPIO); + nmk_gpio_dir(76, 0); + + memset (dev, 0, sizeof (dev)); + dev.flags = DEV_FLAGS_INPUT; + dev.getc = nhk8815_getc; + dev.tstc = nhk8815_tstc; + strcpy(dev.name, keypad); + stdio_register(dev); + return 0; +} diff --git a/board/st/nhk8815/nhk8815-devices.h b/board/st/nhk8815/nhk8815-devices.h new file mode 100644 index 000..78252ed --- /dev/null +++ b/board/st/nhk8815/nhk8815-devices.h @@ -0,0 +1,7 @@ +#ifndef __NHK8815_DEVICES__ +#define __NHK8815_DEVICES__ + +/* Prototypes for functions exported by device files in this directory */ +extern int nhk8815_keypad_init(void); /* ./keypad.c */ + +#endif /* __NHK8815_DEVICES__ */ diff --git a/board/st/nhk8815/nhk8815.c b/board/st/nhk8815/nhk8815.c index eadce40..fbabd15 100644 --- a/board/st/nhk8815/nhk8815.c +++ b/board/st/nhk8815/nhk8815.c @@ -29,6 +29,7 @@
[U-Boot] [PATCH V3 8/9] nhk8815: start lower in RAM, so the 800x480 frame buffer fits
From: Alessandro Rubini rub...@unipv.it This simply moves u-boot to a lower address, as the frame buffer is allocated after u-boot itself in memory. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/config.mk |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/board/st/nhk8815/config.mk b/board/st/nhk8815/config.mk index 590393b..6e5e358 100644 --- a/board/st/nhk8815/config.mk +++ b/board/st/nhk8815/config.mk @@ -18,9 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA -# -# -# image should be loaded at 0x0100 -# -TEXT_BASE = 0x03F8 +# Start 4MB before the end, as the frame buffer is allocate after +# u-boot. 800x480 @ 32bpp takes 1.5MB alone, so let's play safe. +TEXT_BASE = 0x03c0 -- 1.6.0.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V3 9/9] nhk8815: added lcd support
From: Alessandro Rubini rub...@unipv.it This adds lcd support for the board. It includes defines for 32-bit parameter as well, although support for LCD_COLOR32 is not yet in u-boot. This uses the stmpe2401 to turn on display backlight. Signed-off-by: Alessandro Rubini rub...@unipv.it Acked-by: Andrea Gallo andrea.ga...@stericsson.com --- board/st/nhk8815/Makefile |1 + board/st/nhk8815/lcd.c | 88 board/st/nhk8815/nhk8815-devices.h |1 + board/st/nhk8815/nhk8815.c |3 + include/configs/nhk8815.h | 10 5 files changed, 103 insertions(+), 0 deletions(-) create mode 100644 board/st/nhk8815/lcd.c diff --git a/board/st/nhk8815/Makefile b/board/st/nhk8815/Makefile index 1bb1d2c..7155f12 100644 --- a/board/st/nhk8815/Makefile +++ b/board/st/nhk8815/Makefile @@ -31,6 +31,7 @@ LIB = $(obj)lib$(BOARD).a COBJS-y:= nhk8815.o COBJS-$(CONFIG_NHK8815_KEYPAD) += keypad.o +COBJS-$(CONFIG_LCD) += lcd.o COBJS := $(COBJS-y) SOBJS := platform.o diff --git a/board/st/nhk8815/lcd.c b/board/st/nhk8815/lcd.c new file mode 100644 index 000..d3acb48 --- /dev/null +++ b/board/st/nhk8815/lcd.c @@ -0,0 +1,88 @@ +/* + * board/st/nhk8815/lcd.c: use amba clcd and STMPE2401 for backlight/reset + * + * Copyright 2009 Alessandro Rubini rub...@unipv.it + * + * 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 common.h +#include lcd.h +#include amba_clcd.h +#include stmpe2401.h + +/* Two configurations are supported: 32bpp and 16bpp */ +#if LCD_BPP == LCD_COLOR32 +# define CLCD_CNTL_VAL 0x0019182b +# define CLCD_BPIX_VAL 5 /* 15 = 32 */ +#elif LCD_BPP == LCD_COLOR16 +# define CLCD_CNTL_VAL 0x001d1829 +# define CLCD_BPIX_VAL 4 /* 14 = 16 */ +#else +# error Invalid LCD_BPP in config file +#endif + +/* Horribly, these are precomputed registers */ +struct clcd_config nhk8815_clcd_config = { + .address = (struct clcd_registers *)NOMADIK_CLCDC_BASE, + .tim0 = 0xd52600c4, /* horizontal timings */ + .tim1 = 0x220a01df, /* vertical timings */ + .tim2 = 0x031f1821, /* clock and signal polarity */ + .tim3 = 0, /* not used */ + .cntl = CLCD_CNTL_VAL, /* control, pixel size etc */ + .pixclock = 18*1000*1000, /* 18 MHz */ +}; + +/* This is the panel_info for generic boards. Too little info, actually */ +vidinfo_t panel_info = { + .vl_col = 800, + .vl_row = 480, + .vl_bpix = CLCD_BPIX_VAL, + .priv = nhk8815_clcd_config, +}; + +/* Don't turn on (too early), but configure data lines and remove reset */ +void lcd_enable(void) +{ + int i; + + /* Turn the alternate functions as needed */ + for (i = 32; i = 39; i++) + nmk_gpio_af(i, GPIO_ALT_B); + + /* EXP1_GPIO_5 = output high -- remove reset from display */ + pe_gpio_af(STMPE1, 5, PE_GPIO_AF_GPIO); + pe_gpio_dir(STMPE1, 5, 1); + pe_gpio_set(STMPE1, 5, 1); +} + +/* Called from late_init: we turn on the backlight through port expander */ +int nhk8815_backlight_on(void) +{ + int i; + + /* Turn the alternate functions as needed */ + for (i = 32; i = 39; i++) + nmk_gpio_af(i, GPIO_ALT_B); + + /* EXP0_GPIO_21 = output high -- backlight */ + pe_gpio_af(STMPE0, 21, PE_GPIO_AF_GPIO); + pe_gpio_dir(STMPE0, 21, 1); + pe_gpio_set(STMPE0, 21, 1); + return 0; +} diff --git a/board/st/nhk8815/nhk8815-devices.h b/board/st/nhk8815/nhk8815-devices.h index 78252ed..aec5825 100644 --- a/board/st/nhk8815/nhk8815-devices.h +++ b/board/st/nhk8815/nhk8815-devices.h @@ -3,5 +3,6 @@ /* Prototypes for functions exported by device files in this directory */ extern int nhk8815_keypad_init(void); /* ./keypad.c */ +extern int nhk8815_backlight_on(void); /* in ./lcd.c */ #endif /* __NHK8815_DEVICES__ */ diff --git a/board/st/nhk8815/nhk8815.c b/board/st/nhk8815/nhk8815.c index fbabd15..fedb3c0 100644 --- a/board/st/nhk8815/nhk8815.c
Re: [U-Boot] [PATCH V3 6/9] lcd: make 16bpp work
Sorry for this late though about lcd issues. - lcd_color_fg : lcd_color_bg; + *d++ = (bits 0x80) ? 0x : 0; Here my patch uses hardwired 0 and ~0 for 16-bit pixels. Anatolij suggested to use lcd_color_fg and lcd_color_bg as in the original code, but unfortunately it doesn't work. lcd_color_fg is set by common/lcd.c itself, using this function: static void lcd_setfgcolor (int color) { #ifdef CONFIG_ATMEL_LCD lcd_color_fg = color; #else lcd_color_fg = color 0x0F; #endif } So, however white I declare my color, it turns out blue. While I'd understand a difference based on LCD_COLOR8 and LCD_COLOR16 (but even in that case I'd request the caller to do the right thing avoiding this late fix), I really can't tell why the atmel display is different from other ones. It's true that I can force lcd_color_fg to whatever I want, but only after lcd_clear() is called. Moreover, if there's centralized I wouldn't cowardly change it behind it's back. This is one of the reasons why my original post was an RFC. common/lcd.c is quite a mess and touching it is difficult. At this point I still think forcing 0x and 0, ignoring lcd_color_fg, is the right thing to do at least until atmel specifics are removed from common/lcd.c. BTW: I have a 9263ek an a 9261ek, so I might be able to try to propose an atmel-related cleanup in the future, but not on short term, unfortunately. /alessandro ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH, REGRESSION] mpc83xx: provide option to set LCRR early
Kim == Kim Phillips kim.phill...@freescale.com writes: Kim On Fri, 20 Nov 2009 12:42:43 +0100 Kim Peter Korsgaard jac...@sunsite.dk wrote: E.G. on a 8347 board a bootup time increase of ~600ms has been observed: Kim heh, even more on an 8313! Thanks for this - I hadn't realized the Kim difference was so large (or neglected it since the move to init_r was Kim done at the last moment). OK, why exactly was it moved? What do you want to protect against? I don't remember seing anyone complaining about the old location. Fix it by introducing CONFIG_SYS_LCRR_EARLY, and set LCRR in cpu_init_f instead of in cpu_init_r if set. Kim instead of introducing the new CONFIG_SYS_LCRR_EARLY, shouldn't we Kim check for something like: Kim !defined(CONFIG_NAND_SPL) !defined(CONFIG_SYS_RAMBOOT) As in do the reconfig early if we're running from RAM right away? It's not that simple - I have a board which boots from NOR flash. As that is an async device there isn't any problem in changing the LBC settings while you're running from flash (as long as you respect the min access time). I have another design where the flash sits behind a FPGA (for signal integrity reasons), and there I have to wait until we're running in RAM before changing the LBC clock. On the 2nd design I even have to tell the FPGA to resync (through a GPIO pin) and wait a bit before I can continue, so I'm doing the LCRR config in board code (in board_early_init_r). The move to cpu_init_r broke that as well as the LCRR value is overwritten there. Kim btw, this generates: Kim cpu_init.c: In function 'cpu_init_r': Kim cpu_init.c:367: warning: unused variable 'im' Ups, I'll fix that and send a new patch once we agree on the form. -- Bye, Peter Korsgaard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Move do_irqinfo() to common/cmd_irq.c breaks MVBLUE board...
Dear Peter, your commit c253122395 (Move do_irqinfo() to common/cmd_irq.c) breaks building of the MVBLUE board: - ./MAKEALL MVBLUE Configuring for MVBLUE board... common/libcommon.a(cmd_irq.o):(.u_boot_cmd+0x24): undefined reference to `do_irqinfo' make: *** [u-boot] Error 1 Can you please have a look? 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: w...@denx.de What's the sound a name makes when it's dropped? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] MAKEALL: Add summary information breaks MAKEALL return code
Dear Peter, your commit 40a28f0885 (MAKEALL: Add summary information) breaks MAKEALL because we now don't get any useful return code any more. You may argument that we didn't get one before, which is correct for building multiple boards in one call. But when running something like MAKEALL board we did get a return code, so wee could use this for example with git bisect run. One possible fix could look like this: diff --git a/MAKEALL b/MAKEALL index d63c5c2..0cafed8 100755 --- a/MAKEALL +++ b/MAKEALL @@ -952,13 +952,16 @@ build_target() { #--- print_stats() { + rc=0 echo echo - SUMMARY echo Boards compiled: ${TOTAL_CNT} if [ ${ERR_CNT} -gt 0 ] ; then + rc=1 echo Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} ) fi echo -- + exit $rc } #--- But I don't really like this approach, as it still changes behaviour: now even warnings get accounted as errors. What do you think? 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: w...@denx.de An expert is a person who avoids the small errors while sweeping on to the grand fallacy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix out-of-tree building of apollon board.
Signed-off-by: Wolfgang Denk w...@denx.de --- Makefile |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index bcb3fe9..10abadf 100644 --- a/Makefile +++ b/Makefile @@ -3257,6 +3257,7 @@ zylonite_config : # apollon_config : unconfig + @mkdir -p $(obj)include @echo #define CONFIG_ONENAND_U_BOOT $(obj)include/config.h @$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx @echo CONFIG_ONENAND_U_BOOT = y $(obj)include/config.mk -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Move do_irqinfo() to common/cmd_irq.c breaks MVBLUE board...
On Sat, 2009-12-05 at 17:43 -0600, Peter Tyser wrote: On Sun, 2009-12-06 at 00:06 +0100, Wolfgang Denk wrote: Dear Peter, your commit c253122395 (Move do_irqinfo() to common/cmd_irq.c) breaks building of the MVBLUE board: - ./MAKEALL MVBLUE Configuring for MVBLUE board... common/libcommon.a(cmd_irq.o):(.u_boot_cmd+0x24): undefined reference to `do_irqinfo' make: *** [u-boot] Error 1 Can you please have a look? Sure, sorry for the breakage. Looks like MVBLUE has CONFIG_CMD_IRQ defined, but doesn't have CONFIG_CMD_MISC defined. Prior to my move, since the do_irqinfo() was inside cmd_misc.c, the do_irqinfo() call was never compiled. So previously, CONFIG_CMD_IRQ had no effect and was ignored for the MVBLUE. cpu/mpc824x/interrupts.c doesn't have do_irqinfo() implemented, which causes the problem. I'll send a patch which removes CONFIG_CMD_IRQ from MVBLUE.h as a fix. On second thought, this will disable both the 'interrupts' and 'irqinfo' command for the MVBLUE. Andre, do you mind if the 'interrupts' command is not available the MVBLUE? Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] MAKEALL: Add summary information breaks MAKEALL return code
Hi Wolfgang, your commit 40a28f0885 (MAKEALL: Add summary information) breaks MAKEALL because we now don't get any useful return code any more. You may argument that we didn't get one before, which is correct for building multiple boards in one call. But when running something like MAKEALL board we did get a return code, so wee could use this for example with git bisect run. I'm not seeing a useful return code before the change: pty...@petert u-boot $ git reset --hard 40a28f0885~1 HEAD is now at 71ce9bd galaxy5200: enable version environment variable pty...@petert u-boot $ echo asdf common/cmd_nvedit.c pty...@petert u-boot $ ./MAKEALL MVBLUE; echo $? Configuring for MVBLUE board... cmd_nvedit.c:643: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input make[1]: *** [cmd_nvedit.o] Error 1 make[1]: *** Waiting for unfinished jobs make: *** [common/libcommon.a] Error 2 powerpc-linux-size: './u-boot': No such file 0 pty...@petert u-boot $ git checkout master M common/cmd_nvedit.c Already on master Your branch is behind 'origin/master' by 334 commits, and can be fast-forwarded. pty...@petert u-boot $ echo asdf common/cmd_nvedit.c pty...@petert u-boot $ ./MAKEALL MVBLUE; echo $? Configuring for MVBLUE board... cmd_nvedit.c:644: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'asdf' make[1]: *** [cmd_nvedit.o] Error 1 make[1]: *** Waiting for unfinished jobs make: *** [common/libcommon.a] Error 2 powerpc-linux-size: './u-boot': No such file 0 Do you have an example of what breaks? It seems like the behavior should be the same before/after the change. In both cases the last command is tee -a ${LOG_DIR}/$target.MAKELOG, which always returns 0. I agree that it would be nice to have a valid return code either way though:) Peter One possible fix could look like this: diff --git a/MAKEALL b/MAKEALL index d63c5c2..0cafed8 100755 --- a/MAKEALL +++ b/MAKEALL @@ -952,13 +952,16 @@ build_target() { #--- print_stats() { + rc=0 echo echo - SUMMARY echo Boards compiled: ${TOTAL_CNT} if [ ${ERR_CNT} -gt 0 ] ; then + rc=1 echo Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} ) fi echo -- + exit $rc } #--- But I don't really like this approach, as it still changes behaviour: now even warnings get accounted as errors. What do you think? Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] zlib.c: avoid build conflicts for cradle board
Commit dce3d79710 updated the zlib code to v0.95; this caused conflicts when building for the cradle board, because the (pretty generic) preprocessor variable OFF was used in multiple files. Make sure to avoid further conflicts by #undef'ing it in zlib.c before redefining it. Signed-off-by: Wolfgang Denk w...@denx.de cc: Giuseppe Condorelli giuseppe.condore...@st.com cc: Angelo Castello angelo.caste...@st.com cc: Alessandro Rubini rubini-l...@gnudd.com --- lib_generic/zlib.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c index 8fe3bd0..ef1fa22 100644 --- a/lib_generic/zlib.c +++ b/lib_generic/zlib.c @@ -28,6 +28,8 @@ #include u-boot/zlib.h #include common.h +#undef OFF /* avoid conflicts */ + /* To avoid a build time warning */ #ifdef STDC #include malloc.h -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] trab: fix warning: implicit declaration of function 'disable_vfd'
Signed-off-by: Wolfgang Denk w...@denx.de --- cpu/arm920t/s3c24x0/timer.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c index 20cedd4..a27f0e2 100644 --- a/cpu/arm920t/s3c24x0/timer.c +++ b/cpu/arm920t/s3c24x0/timer.c @@ -205,6 +205,8 @@ void reset_cpu(ulong ignored) struct s3c24x0_watchdog *watchdog; #ifdef CONFIG_TRAB + extern void disable_vfd(void); + disable_vfd(); #endif -- 1.6.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] i2c on mx27
Hi, Has anyone tried playing with the hardware i2c on the mx27 platform using u-boot. I am trying to enable the second controller and use hardware i2c by doing memory writes to the appropiate registers using mw. Looks like i am missing out on some register values. I am unable to toggle the signals on the I2C2_CLK and I2C2_data lines. I have modifed the mux registers and the pad registers and the Clock gating registers appropiately. Any hints? Thanks, Alfred. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] MAKEALL: Fix return value
Previously MAKEALL would always return a value of 0, even if 1 or more boards did not compile. This change causes MAKEALL to return the number of board's which did not compile. 0 indicates success, 2 indicates 2 board did not compile, etc. Boards with compile warnings do not affect the return value, only boards which failed to compile. Note that this change also requires changing the script interpreter from sh to bash to support bash's PIPESTATUS variable. Signed-off-by: Peter Tyser pty...@xes-inc.com --- MAKEALL | 29 +++-- 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/MAKEALL b/MAKEALL index d63c5c2..1227abd 100755 --- a/MAKEALL +++ b/MAKEALL @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Print statistics when we exit trap exit 1 2 3 15 @@ -39,6 +39,7 @@ LIST= ERR_CNT=0 ERR_LIST= TOTAL_CNT=0 +RC=0 # ## MPC5xx Systems @@ -936,6 +921,10 @@ build_target() { ${MAKE} ${JOBS} all 21 ${LOG_DIR}/$target.MAKELOG \ | tee ${LOG_DIR}/$target.ERR + + # Keep a running total of all 'make' return values + RC=$((RC + ${PIPESTATUS[0]})) + if [ -s ${LOG_DIR}/$target.ERR ] ; then ERR_CNT=$((ERR_CNT + 1)) ERR_LIST=${ERR_LIST} $target @@ -959,6 +948,10 @@ print_stats() { echo Boards with warnings or errors: ${ERR_CNT} (${ERR_LIST} ) fi echo -- + + # Return how many board compiles failed, assuming 'make' returns 2 + # for builds which failed + exit $(((RC + 1) / 2)) } #--- -- 1.6.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tools/mkimage: Remove duplicate line of code
Recent commits 1a99de2cb4d08eb3bf9fb3f60a9d533150de8c0e and 6a590c5f5fd12cdd27f3153522acfac3854590e7 both fixed the same bug in the same manner. Unfortunately git was smart enough to merge both changes which resulted in some duplicate code. Signed-off-by: Peter Tyser pty...@xes-inc.com --- tools/mkimage.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 6826eae..5a82b4e 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -222,21 +222,20 @@ main (int argc, char **argv) fprintf (stderr, %s: invalid entry point %s\n, params.cmdname, *argv); exit (EXIT_FAILURE); } params.eflag = 1; goto NXTARG; case 'f': if (--argc = 0) usage (); - params.type = IH_TYPE_FLATDT; params.datafile = *++argv; params.fflag = 1; /* * The flattened image tree (FIT) format * requires a flattened device tree image type */ params.type = IH_TYPE_FLATDT; goto NXTARG; case 'n': -- 1.6.2.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] MAKEALL: Fix return value
On Sunday 06 December 2009 02:09:34 Peter Tyser wrote: ${MAKE} ${JOBS} all 21 ${LOG_DIR}/$target.MAKELOG \ | tee ${LOG_DIR}/$target.ERR you could rewrite this to keep POSIX compliance: # need to maintain exit value ourselves as pipes eat it fail=${LOG_DIR}/$target.failed rm -f ${fail} (${MAKE} ${JOBS} all 21 ${LOG_DIR}/$target.MAKELOG \ || touch ${fail}) | tee ${LOG_DIR}/$target.ERR [ -e ${fail} ] : $(( RC += 1 )) rm -f ${fail} + # Keep a running total of all 'make' return values + RC=$((RC + ${PIPESTATUS[0]})) this might be more natural: : $(( RC += ${PIPESTATUS[0]} )) + # Return how many board compiles failed, assuming 'make' returns 2 + # for builds which failed + exit $(((RC + 1) / 2)) the problem here is that exit statuses have a range of 256 values. so as soon as more than 255 boards fail, this wont work. maybe i'm being overly paranoid though ? $ (exit 256); echo $? 0 -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot