Re: [U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support
On Sunday 09 October 2011 11:59:29 Mike Frysinger wrote: On Saturday 08 October 2011 20:20:47 Pali Rohár wrote: On Thursday 01 September 2011 09:57:13 you wrote: On Thursday, September 01, 2011 07:34:29 Pali Rohár wrote: --- /dev/null +++ b/board/nokia/rx51/rx51.c +GraphicDevice gdev; no camel case GraphicDevice is defined in include/video_fb.h ok, nothing you can do about that --- /dev/null +++ b/board/nokia/rx51/rx51.h +const omap3_sysinfo sysinfo = { you should not be defining variable storage in header files this code was derivated from board/ti/beagle/beagle.h and beagle.h still has this code beagle.h is broken too. please don't copy their brokenness :). Ok, this RX-51 code I mode into rx51.c (I hope it will be ok) +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ? all boards in board/ti/ has this code dumb behavior shouldn't be encouraged :). that indicates even more strongly that this should be in a SoC header somewhere. -mike definitions of MUX are in arch/arm/include/asm/arch/mux.h and in rx51.h is used these defines. Info in rx51.h is RX-51 specified, other ti boards have similar but different code. -- Pali Rohár pali.ro...@gmail.com 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
Re: [U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support
On Saturday 08 October 2011 20:20:47 Pali Rohár wrote: On Thursday 01 September 2011 09:57:13 you wrote: On Thursday, September 01, 2011 07:34:29 Pali Rohár wrote: --- /dev/null +++ b/board/nokia/rx51/rx51.c +GraphicDevice gdev; no camel case GraphicDevice is defined in include/video_fb.h ok, nothing you can do about that --- /dev/null +++ b/board/nokia/rx51/rx51.h +const omap3_sysinfo sysinfo = { you should not be defining variable storage in header files this code was derivated from board/ti/beagle/beagle.h and beagle.h still has this code beagle.h is broken too. please don't copy their brokenness :). +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ? all boards in board/ti/ has this code dumb behavior shouldn't be encouraged :). that indicates even more strongly that this should be in a SoC header somewhere. -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
Re: [U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support
On Thursday 01 September 2011 09:57:13 you wrote: On Thursday, September 01, 2011 07:34:29 Pali Rohár wrote: --- /dev/null +++ b/board/nokia/rx51/Makefile +LIB= $(obj)lib$(BOARD).a +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) your makefiles are old. the LIB is supposed to be a .o not .a now, and you need to call the link command rather than use $(AR). look at board/bf537- stamp/Makefile as a simple example. ok, now I have updated makefile --- /dev/null +++ b/board/nokia/rx51/config.mk +TEXT_BASE = 0x80e8 pretty sure this is old and you should use a CONFIG_xxx in your board config header. then you can delete this config.mk file. deleted --- /dev/null +++ b/board/nokia/rx51/rx51.c +GraphicDevice gdev; no camel case GraphicDevice is defined in include/video_fb.h +char keymap[] = { + /* normal */ + 'q', 'o', 'p', ',', '\b',0, 'a', 's', + 'w', 'd', 'f', 'g', 'h', 'j', 'k', 'l', + 'e', '.',0, '\r', 0, 'z', 'x', 'c', + 'r', 'v', 'b', 'n', 'm', ' ',0,0, + 't',0,0,0,0,0,0,0, + 'y',0,0,0,0,0,0,0, + 'u',0,0,0,0,0,0,0, + 'i',0,0,0,0,0,0,0, + /* fn */ + '1', '9', '0', '=', '\b',0, '*', '+', + '2', '#', '-', '_', '(', ')', '', '!', + '3', '?',0, '\r',0,0, '$',0, + '4', '/', '\\', '', '\'', '@',0,0, + '5',0,0,0,0,0,0,0, + '6',0,0,0,0,0,0,0, + '7',0,0,0,0,0,0,0, + '8',0,0,0,0,0,0,0, +}; + +u8 keys[8]; +u8 old_keys[8] = {0, 0, 0, 0, 0, 0, 0, 0}; +#define KEYBUF_SIZE 4 +u8 keybuf[KEYBUF_SIZE]; +u8 keybuf_head = 0, keybuf_tail = 0; these probably all should be static. and keymap[] should probably also be const. done --- /dev/null +++ b/board/nokia/rx51/rx51.h +const omap3_sysinfo sysinfo = { you should not be defining variable storage in header files this code was derivated from board/ti/beagle/beagle.h and beagle.h still has this code +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ? all boards in board/ti/ has this code -mike -- Pali Rohár pali.ro...@gmail.com 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
[U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support
From: Alistair Buxton a.j.bux...@gmail.com This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. NOLO is expecting a kernel image and will treat any image it finds in onenand as such. This u-boot is intended to be flashed to the N900 like a kernel. In order to transparently boot the original kernel, it will be appended to u-boot.bin at 0x4. NOLO will load the entire image into memory and execute u-boot, which saves the ATAGs set by NOLO. Then the bootscripts will attempt to load uImage or boot.scr from a fat filesystem on MMC1 partition 3. If this fails, the appended kernel image will be booted using the stored ATAGs. There is also support for framebuffer and the N900 keyboard. USB tty works but is disabled because it prevents the current Maemo kernel from booting. Signed-off-by: Alistair Buxton a.j.bux...@gmail.com --- board/nokia/rx51/Makefile| 49 ++ board/nokia/rx51/config.mk | 33 board/nokia/rx51/rx51.c | 255 board/nokia/rx51/rx51.h | 382 ++ boards.cfg |1 + include/configs/nokia_rx51.h | 329 6 files changed, 1049 insertions(+), 0 deletions(-) create mode 100644 board/nokia/rx51/Makefile create mode 100644 board/nokia/rx51/config.mk create mode 100644 board/nokia/rx51/rx51.c create mode 100644 board/nokia/rx51/rx51.h create mode 100644 include/configs/nokia_rx51.h diff --git a/board/nokia/rx51/Makefile b/board/nokia/rx51/Makefile new file mode 100644 index 000..31ad6fd --- /dev/null +++ b/board/nokia/rx51/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := rx51.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/nokia/rx51/config.mk b/board/nokia/rx51/config.mk new file mode 100644 index 000..6c81a34 --- /dev/null +++ b/board/nokia/rx51/config.mk @@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, www.ti.com +# +# Nokia N900 uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# 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 +# +# Physical Address: +# 8000' (bank0) +# 8800/ (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +TEXT_BASE = 0x80e8 diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c new file mode 100644 index 000..3149a79 --- /dev/null +++ b/board/nokia/rx51/rx51.c @@ -0,0 +1,255 @@ +/* + * (C) Copyright 2010 + * Alistair Buxton a.j.bux...@gmail.com + * + * Derived from Beagle Board and 3430 SDP code: + * (C) Copyright 2004-2008 + * Texas Instruments, www.ti.com + * + * Author : + * Sunil
Re: [U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support
On Thursday, September 01, 2011 07:34:29 Pali Rohár wrote: --- /dev/null +++ b/board/nokia/rx51/Makefile +LIB = $(obj)lib$(BOARD).a +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) your makefiles are old. the LIB is supposed to be a .o not .a now, and you need to call the link command rather than use $(AR). look at board/bf537- stamp/Makefile as a simple example. --- /dev/null +++ b/board/nokia/rx51/config.mk +TEXT_BASE = 0x80e8 pretty sure this is old and you should use a CONFIG_xxx in your board config header. then you can delete this config.mk file. --- /dev/null +++ b/board/nokia/rx51/rx51.c +GraphicDevice gdev; no camel case +char keymap[] = { + /* normal */ + 'q', 'o', 'p', ',', '\b',0, 'a', 's', + 'w', 'd', 'f', 'g', 'h', 'j', 'k', 'l', + 'e', '.',0, '\r', 0, 'z', 'x', 'c', + 'r', 'v', 'b', 'n', 'm', ' ',0,0, + 't',0,0,0,0,0,0,0, + 'y',0,0,0,0,0,0,0, + 'u',0,0,0,0,0,0,0, + 'i',0,0,0,0,0,0,0, + /* fn */ + '1', '9', '0', '=', '\b',0, '*', '+', + '2', '#', '-', '_', '(', ')', '', '!', + '3', '?',0, '\r',0,0, '$',0, + '4', '/', '\\', '', '\'', '@',0,0, + '5',0,0,0,0,0,0,0, + '6',0,0,0,0,0,0,0, + '7',0,0,0,0,0,0,0, + '8',0,0,0,0,0,0,0, +}; + +u8 keys[8]; +u8 old_keys[8] = {0, 0, 0, 0, 0, 0, 0, 0}; +#define KEYBUF_SIZE 4 +u8 keybuf[KEYBUF_SIZE]; +u8 keybuf_head = 0, keybuf_tail = 0; these probably all should be static. and keymap[] should probably also be const. --- /dev/null +++ b/board/nokia/rx51/rx51.h +const omap3_sysinfo sysinfo = { you should not be defining variable storage in header files +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ? -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