From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] LPC2468 support
Date: Wed, 25 Mar 2009 22:43:44 +0100 [thread overview]
Message-ID: <20090325214344.GC18991@game.jcrosoft.org> (raw)
In-Reply-To: <49C9EB4D.5050503@duran-audio.com>
> >> --- u-boot-orig/cpu/arm720t/lpc24xx/Makefile 1970-01-01 01:00:00.000000000 +0100
> >> +++ u-boot-cleanup/cpu/arm720t/lpc24xx/Makefile 2009-03-19 10:56:53.000000000 +0100
> > ...
> >> +$(SOBJS):
> >> + $(CC) $(AFLAGS) -march=armv4t -c -o $(SOBJS) iap_entry.S
> >
> > Such compile options hsould probably be set globally, not just for
> > this single source file?
>
> No, thumb code is less efficient in terms of performance, but this
> single file needs thumb code. See LPC2292.
what is the Difference?
until a real big gap please do not use thumb
>
> >> diff -upNr u-boot-orig/cpu/arm720t/start.S u-boot-cleanup/cpu/arm720t/start.S
> >> --- u-boot-orig/cpu/arm720t/start.S 2009-03-18 00:42:12.000000000 +0100
> >> +++ u-boot-cleanup/cpu/arm720t/start.S 2009-03-24 11:52:35.000000000 +0100
> >> @@ -127,7 +127,7 @@ reset:
> >> bl cpu_init_crit
> >> #endif
> >>
> >> -#ifdef CONFIG_LPC2292
> >> +#if defined(CONFIG_LPC2292) || defined(CONFIG_LPC2468)
> >
> > Is there no way to combine this code with the one for the LPC2292?
>
> I'm sorry, it is combined in this case, no?
>
> >> #else
> >> #error No cpu_init_crit() defined for current CPU type
> >> #endif
> >> @@ -383,7 +387,7 @@ lock_loop:
> >> str r1, [r0]
> >> #endif
> >>
> >> -#ifndef CONFIG_LPC2292
> >> +#if !defined(CONFIG_LPC2292) && !defined(CONFIG_LPC2468)
> >
> > Is there no way to combine this code with the one for the LPC2292?
>
> Same here.
>
> >
> >> mov ip, lr
> >> /*
> >> * before relocating, we have to setup RAM timing
> >> @@ -601,7 +605,7 @@ reset_cpu:
> >> * on external peripherals such as watchdog timers, etc. */
> >> #elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
> >> /* No specific reset actions for IntegratorAP/CM720T as yet */
> >> -#elif defined(CONFIG_LPC2292)
> >> +#elif defined(CONFIG_LPC2292) || defined(CONFIG_LPC2468)
> >
> > Is there no way to combine this code with the one for the LPC2292?
>
> Same here.
>
> >
> >> .align 5
> >> .globl reset_cpu
> >> reset_cpu:
> >> diff -upNr u-boot-orig/include/asm-arm/arch-lpc24xx/hardware.h u-boot-cleanup/include/asm-arm/arch-lpc24xx/hardware.h
> >> --- u-boot-orig/include/asm-arm/arch-lpc24xx/hardware.h 1970-01-01 01:00:00.000000000 +0100
> >> +++ u-boot-cleanup/include/asm-arm/arch-lpc24xx/hardware.h 2009-03-24 11:54:44.000000000 +0100
> >> @@ -0,0 +1,32 @@
> >> +#ifndef __ASM_ARCH_HARDWARE_H
> >> +#define __ASM_ARCH_HARDWARE_H
> >> +
> >> +/*
> >> + * Copyright (c) 2004 Cucy Systems (http://www.cucy.com)
> >> + * Curt Brune <curt@cucy.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
> >> + */
> >> +
> >> +#if defined(CONFIG_LPC2468)
> >> +#else
> >> +#error No hardware file defined for this configuration
> >> +#endif
> >> +
> >> +#endif /* __ASM_ARCH_HARDWARE_H */
> >
> > Ummm... What exactly is this file needed for?
>
> I don't need it, but start.S wants to include it. See my comment about
> the #ifdef's. Other architectures left it empty too, so it seemed the
> best option to me.
>
> >> +/* Macros for reading/writing registers */
> >> +#define PUT8(reg, value) (*(volatile unsigned char*)(reg) = (value))
> >> +#define PUT16(reg, value) (*(volatile unsigned short*)(reg) = (value))
> >> +#define PUT32(reg, value) (*(volatile unsigned int*)(reg) = (value))
> >> +#define GET8(reg) (*(volatile unsigned char*)(reg))
> >> +#define GET16(reg) (*(volatile unsigned short*)(reg))
> >> +#define GET32(reg) (*(volatile unsigned int*)(reg))
> >
> > Do you clain these are proper accessor functions for your processor?
>
> Yes I do. They are straight from the LPC2292 code, so once they were
> considered OK. I checked out the the write{s,l,b} functions in asm/io.h,
> but although they look similar, for some reason they simply don't work.
> Given the similarities between the write{s,l,b} and the PUT* functions,
> what is the problem with those? Furthermore, the ARM architecture
> doesn't use any kind of special instructions for accessing registers,
> everything is memory mapped.
please use readx/writex
>
>
> I do understand that you want the best code for U-boot, but I do not
> entirely agree on all points. Certainly when I look at the code already
> in place in U-boot.
I'm preparing a patch series to clean the arm720t to seprate it as arch
and avoid this borring #ifdef
Best Regards,
J.
next prev parent reply other threads:[~2009-03-25 21:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 13:13 [U-Boot] [PATCH 1/1] LPC2468 support Remco Poelstra
2009-03-18 13:58 ` Wolfgang Denk
2009-03-18 14:54 ` [U-Boot] [PATCH 1/2] " Remco Poelstra
2009-03-18 16:46 ` Wolfgang Denk
2009-03-19 15:06 ` Remco Poelstra
2009-03-19 21:22 ` Wolfgang Denk
2009-03-24 11:05 ` Remco Poelstra
2009-03-24 22:33 ` Wolfgang Denk
2009-03-25 8:29 ` Remco Poelstra
2009-03-25 9:47 ` Wolfgang Denk
2009-03-25 10:06 ` Remco Poelstra
2009-03-25 21:51 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-26 9:03 ` Remco Poelstra
2009-04-24 11:57 ` Remco Poelstra
2009-04-24 12:55 ` Wolfgang Denk
2009-04-28 9:14 ` Remco Poelstra
2009-04-28 16:43 ` Ben Warren
2009-04-24 21:58 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 22:14 ` Wolfgang Denk
2009-04-25 12:47 ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-27 7:27 ` Stefan Roese
2009-04-27 23:20 ` Wolfgang Denk
2009-04-28 6:27 ` Stefan Roese
2009-04-28 6:46 ` Wolfgang Denk
2009-04-28 7:08 ` Stefan Roese
2009-03-25 21:43 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-03-26 9:10 ` Remco Poelstra
2009-03-26 9:27 ` Remco Poelstra
2009-03-18 14:56 ` [U-Boot] [PATCH 2/2] LPC2468 example board Remco Poelstra
2009-03-25 22:01 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-26 9:11 ` Remco Poelstra
2009-04-28 13:54 ` Remco Poelstra
2009-07-17 22:18 ` Wolfgang Denk
2009-07-18 16:16 ` Jean-Christophe PLAGNIOL-VILLARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090325214344.GC18991@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.