public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Schwingen <rincewind@discworld.dascon.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [IXP42x PATCH series v4 04/17] Fix IXP code to work after relocation was added
Date: Sun, 22 May 2011 21:15:03 +0200	[thread overview]
Message-ID: <4DD960B7.6010407@discworld.dascon.de> (raw)
In-Reply-To: <201105210158.56692.marek.vasut@gmail.com>

Am 05/21/2011 01:58 AM, schrieb Marek Vasut:
>
>> -int timer_init (void)
>> +unsigned long long get_ticks(void)
>>  {
>> -	/* install interrupt handler for timer */
>> -	irq_install_handler(IXP425_TIMER_2_IRQ, timer_isr, (void *)&timestamp);
>> -
>> -	/* setup the Timer counter value */
>> -	*IXP425_OSRT2 = (LATCH & ~IXP425_OST_RELOAD_MASK) | IXP425_OST_ENABLE;
>> +	ulong now = *IXP425_OSTS_B;
> Aren't you missing an IO accessor here ?
Oops - you are correct.


>> diff --git a/arch/arm/include/asm/arch-ixp/ixp425.h
>> b/arch/arm/include/asm/arch-ixp/ixp425.h index 2114437..5132607 100644
>> --- a/arch/arm/include/asm/arch-ixp/ixp425.h
>> +++ b/arch/arm/include/asm/arch-ixp/ixp425.h
>> @@ -391,9 +391,8 @@
>>  #define IXP425_TIMER_REG(x) (IXP425_TIMER_BASE_PHYS+(x))
>>  #endif
>>
>> -#if 0 /* test-only: also defined in npe/include/... */
>> -#define IXP425_OSTS	IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
>> -#endif
>> +/* _B to avoid collision: also defined in npe/include/... */
>> +#define IXP425_OSTS_B	IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
>>  #define IXP425_OST1	IXP425_TIMER_REG(IXP425_OST1_OFFSET)
>>  #define IXP425_OSRT1	IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)
>>  #define IXP425_OST2	IXP425_TIMER_REG(IXP425_OST2_OFFSET)
> This will eventually enjoy being converted to struct ixp_timer_regset { ... } 
> goo. If you already did it in some further patch, sorry, I didn't get there yet 
> ;-)
That would probably require a major rework of all the Intel access/NPE
library code - this is not something I want to touch now.
Most of these defines are used inside the Intel code, so cleaning up
only outside of that area would not improve the code much.

cu
Michael

  reply	other threads:[~2011-05-22 19:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 21:49 [U-Boot] [IXP42x PATCH series v4 00/17] Overview Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 01/17] add XScale sub architecture (IXP/PXA) to maintainer list Michael Schwingen
2011-05-20 23:53   ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 02/17] add support for IXP42x Rev. B1 and newer Michael Schwingen
2011-05-20 23:53   ` Marek Vasut
2011-05-21 18:31     ` Wolfgang Denk
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 03/17] trigger hardware watchdog in IXP42x serial driver Michael Schwingen
2011-05-20 23:54   ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 04/17] Fix IXP code to work after relocation was added Michael Schwingen
2011-05-20 23:58   ` Marek Vasut
2011-05-22 19:15     ` Michael Schwingen [this message]
2011-05-23  0:38       ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 05/17] fix "depend" target in npe directory Michael Schwingen
2011-05-20 23:59   ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 06/17] support CONFIG_SYS_LDSCRIPT on ARM Michael Schwingen
2011-05-22 15:33   ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 07/17] use -ffunction-sections / --gc-sections on IXP42x Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 08/17] update/fix AcTux1 board Michael Schwingen
2011-05-21  0:03   ` Marek Vasut
2011-05-22 15:36     ` Marek Vasut
2011-05-22 21:53       ` Michael Schwingen
2011-05-22 19:51     ` Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 09/17] update/fix AcTux2 board Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 10/17] update/fix AcTux3 board Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 11/17] update/fix AcTux4 board Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 12/17] IXP NPE: add support for fixed-speed MII ports Michael Schwingen
2011-05-21  0:05   ` Marek Vasut
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 13/17] add dvlhost (dLAN 200 AV Wireless G) board Michael Schwingen
2011-05-21  0:06   ` Marek Vasut
2011-05-22 20:53     ` Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 14/17] update/fix IXDP425 / IXDPG425 boards Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 15/17] update/fix PDNB3 board Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 16/17] IXP42x PCI rewrite Michael Schwingen
2011-04-06 21:49 ` [U-Boot] [IXP42x PATCH series v4 17/17] run arm_pci_init after relocation Michael Schwingen

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=4DD960B7.6010407@discworld.dascon.de \
    --to=rincewind@discworld.dascon.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox