From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
linux@roeck-us.net
Subject: Re: [Qemu-devel] [PATCH v1 4/5] xilinx_timer: Fix writes into TCSR register
Date: Thu, 8 May 2014 03:42:59 +0000 [thread overview]
Message-ID: <20140508034258.GG7381@hostname> (raw)
In-Reply-To: <CAEgOgz7FEoFAB4vzmRqdFrePkkB5Hb-E5P56zBrbgeDuY9Mo5g@mail.gmail.com>
On Thu, May 08, 2014 at 12:45:03PM +1000, Peter Crosthwaite wrote:
> On Thu, May 8, 2014 at 11:35 AM, Edgar E. Iglesias
> <edgar.iglesias@gmail.com> wrote:
> > From: Guenter Roeck <linux@roeck-us.net>
> >
> > The TCSR register has only 11 valid bits. This is now used by the
> > linux kernel to auto-detect endianness, and causes Linux 3.15-rc1
> > and later to hang when run under qemu-microblaze. Mask valid bits
> > before writing the register to solve the problem.
> >
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> > ---
> > hw/timer/xilinx_timer.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c
> > index 6113b97..3ff1da9 100644
> > --- a/hw/timer/xilinx_timer.c
> > +++ b/hw/timer/xilinx_timer.c
> > @@ -169,7 +169,7 @@ timer_write(void *opaque, hwaddr addr,
> > if (value & TCSR_TINT)
> > value &= ~TCSR_TINT;
> >
> > - xt->regs[addr] = value;
> > + xt->regs[addr] = value & 0x7ff;
>
> In at least the later TRMs, Bit 11 is validly defined as the cascade
> bit, taking the total number of bits to 12. I think this mask should
> be 0xfff.
Hi,
For timer versions without cascading support, bit 11 is reserved.
I think the patch is good. Once someone adds cascading support we
can expose and implement the cascading bit + the necessary
additional regs.
Cheers,
Edgar
next prev parent reply other threads:[~2014-05-08 3:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 1:35 [Qemu-devel] [PATCH v1 0/5] MicroBlaze queue Edgar E. Iglesias
2014-05-08 1:35 ` [Qemu-devel] [PATCH v1 1/5] microblaze: Support loading of u-boot initrd images Edgar E. Iglesias
2014-05-08 2:33 ` Peter Crosthwaite
2014-05-08 1:35 ` [Qemu-devel] [PATCH v1 2/5] microblaze: Respect the reset vector Edgar E. Iglesias
2014-05-08 2:34 ` Peter Crosthwaite
2014-05-08 1:35 ` [Qemu-devel] [PATCH v1 3/5] xilinx_intc: Fix writes into MER register Edgar E. Iglesias
2014-05-08 2:39 ` Peter Crosthwaite
2014-05-08 1:35 ` [Qemu-devel] [PATCH v1 4/5] xilinx_timer: Fix writes into TCSR register Edgar E. Iglesias
2014-05-08 2:45 ` Peter Crosthwaite
2014-05-08 3:42 ` Edgar E. Iglesias [this message]
2014-05-08 1:35 ` [Qemu-devel] [PATCH v1 5/5] microblaze: boot: Don't hack the elf entry point Edgar E. Iglesias
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=20140508034258.GG7381@hostname \
--to=edgar.iglesias@gmail.com \
--cc=linux@roeck-us.net \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/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.