linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/17] ARM: pxa: Access SMEMC via virtual addresses
Date: Wed, 3 Nov 2010 16:40:23 +0000	[thread overview]
Message-ID: <20101103164023.GB11751@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201011031630.03658.marek.vasut@gmail.com>

On Wed, Nov 03, 2010 at 04:30:03PM +0100, Marek Vasut wrote:
> > >        /* Fix timings for dm9000s (CS1/CS2)*/
> > > -       MSC0 = (MSC0 & 0xffff) | (dm9000_msc << 16);
> > > -       MSC1 = (MSC1 & 0xffff0000) | dm9000_msc;
> > > +       __raw_writel((MSC0 & 0xffff) | (dm9000_msc << 16), MSC0);
> > > +       __raw_writel((MSC1 & 0xffff0000) | dm9000_msc, MSC1);
> > 
> > This isn't correct.
> 
> I don't see the difference (well, besides that this should be adjusted by 
> bootloader).

Eric is quite right - the above is not a correct conversion - it's a
functional change.

	MSC0 = (MSC0 & 0xffff) | (dm9000_msc << 16);

Reads the MSC0 register, modifies its value, and writes it back.

	__raw_writel((MSC0 & 0xffff) | (dm9000_msc << 16), MSC0);

Uses the MSC0 register address, modifies that address value, and then
writes it to the MSC0 register.

> > > @@ -205,19 +218,18 @@ pxa2xx_pcmcia_frequency_change(struct
> > > soc_pcmcia_socket *skt, static void pxa2xx_configure_sockets(struct
> > > device *dev)
> > >  {
> > >        struct pcmcia_low_level *ops = dev->platform_data;
> > > -
> > >        /*
> > >         * We have at least one socket, so set MECR:CIT
> > >         * (Card Is There)
> > >         */
> > > -       MECR |= MECR_CIT;
> > > +       uint32_t mecr = MECR_CIT;
> > > 
> > >        /* Set MECR:NOS (Number Of Sockets) */
> > >        if ((ops->first + ops->nr) > 1 ||
> > >            machine_is_viper() || machine_is_arcom_zeus())
> > > -               MECR |= MECR_NOS;
> > > -       else
> > > -               MECR &= ~MECR_NOS;
> > > +               mecr |= MECR_NOS;
> > > +
> > > +       __raw_writel(mecr, MECR);
> > 
> > This looks to be a bit inconsistent with the original code?

No comment for this - and I agree with Eric.  This again is not just a
conversion from having MECR accessing the register, to using __raw_readl
and __raw_writel.  It always forces MECR_CIT to be set - which may not
be what was there originally.

It's another functional change.

  reply	other threads:[~2010-11-03 16:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-02 23:51 [PATCH 01/17] ARM: pxa: Fix missing includes Marek Vasut
2010-11-02 23:51 ` [PATCH 02/17] ARM: pxa: Access SMEMC via virtual addresses Marek Vasut
2010-11-03 14:37   ` Eric Miao
2010-11-03 15:30     ` Marek Vasut
2010-11-03 16:40       ` Russell King - ARM Linux [this message]
2010-11-03 16:48         ` Marek Vasut
2010-11-03 17:30       ` Eric Miao
2010-11-02 23:51 ` [PATCH 03/17] ARM: pxa: Toradex Colibri PXA270 CF support Marek Vasut
2010-11-03 14:44   ` Eric Miao
2010-11-02 23:51 ` [PATCH 04/17] ARM: pxa: Push Colibri evalboard MFP into module files Marek Vasut
2010-11-03 14:47   ` Eric Miao
2010-11-02 23:51 ` [PATCH 05/17] ARM: pxa: Add M41T00 RTC support into Colibri evalboard Marek Vasut
2010-11-02 23:51 ` [PATCH 06/17] ARM: pxa: Rename " Marek Vasut
2010-11-03 14:53   ` Eric Miao
2010-11-02 23:51 ` [PATCH 07/17] ARM: pxa: Colibri PXA320 PCMCIA driver Marek Vasut
2010-11-02 23:51 ` [PATCH 08/17] ARM: pxa: Modularize Palm Tungsten|C Marek Vasut
2010-11-02 23:51 ` [PATCH 09/17] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
2010-12-01  2:51   ` Eric Miao
2010-12-01  9:38     ` Samuel Ortiz
2010-11-02 23:51 ` [PATCH 10/17] ARM: pxa: Correct touch IRQ passing to UCB1400 on vpac270 Marek Vasut
2010-12-14 14:07   ` Eric Miao
2010-11-02 23:51 ` [PATCH 11/17] ARM: pxa: Pass GPIO offset to ucb1400-gpio on PalmTC Marek Vasut
2010-11-02 23:51 ` [PATCH 12/17] ARM: pxa: Add gpio-leds and vibrator support to PalmTC Marek Vasut
2010-11-02 23:51 ` [PATCH 13/17] ARM: pxa: Fix pxa2xx-flash section mismatch Marek Vasut
2010-11-02 23:51 ` [PATCH 14/17] ARM: pxa: Fix number of IRQs on Balloon3 Marek Vasut
2010-11-02 23:51 ` [PATCH 15/17] ARM: pxa: Update Balloon3 for new FPGA firmware Marek Vasut
2010-11-02 23:51 ` [PATCH 16/17] SND: Tosa: Fix pointer to codec location Marek Vasut
2010-11-02 23:51 ` [PATCH 17/17] ARM: pxa/colibri: setup pins for USB host port 3 Marek Vasut
2010-11-03 13:33 ` [PATCH 01/17] ARM: pxa: Fix missing includes Eric Miao

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=20101103164023.GB11751@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).