All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH 08/10] add TI AR7 support
Date: Thu, 4 Jun 2009 11:22:13 +0200	[thread overview]
Message-ID: <200906041122.14063.florian@openwrt.org> (raw)
In-Reply-To: <20090602125159.GC11488@linux-mips.org>

Hallo Ralf,

Le Tuesday 02 June 2009 14:51:59 Ralf Baechle, vous avez écrit :
[snip]
> > +
> > +	writel(((prediv - 1) << PREDIV_SHIFT) | (postdiv - 1), &clock->ctrl);
> > +	mdelay(1);
> > +	writel(4, &clock->pll);
> > +	while (readl(&clock->pll) & PLL_STATUS)
> > +		;
> > +	writel(((mul - 1) << MUL_SHIFT) | (0xff << 3) | 0x0e, &clock->pll);
> > +	mdelay(75);
>
> These calls to mdelay seem to be done very early before BogoMIPS has been
> calibrated?

Yes, is there a prefered way than using mdelay here ?

>
>
> Can you elaborate?

I do not think there has been AR7 devices having non-8250 compatible UARTs out 
there thus this code is simply useful. What is meant by the comment is that 
the UART will be reported by Linux as  ttyS0 .... is a Xscale. But this 
should not happen since there are only 8250 UARTs.

> If you don't have a MAC address, either use random_ether_addr() or don't
> bring up the network interface at all.  Multiple interfaces with the same
> MAC can cause chaos on a network to better avoid that.

Thanks for spotting this.

>
> > +struct psp_env_chunk {
> > +	u8 num;
> > +	u8 ctrl;
> > +	u16 csum;
> > +	u8 len;
> > +	char data[11];
> > +} __attribute__ ((packed));
>
> Afair historic versions of this code were totally polluted with
> __attribute__((packed)).  Thanks for cleaning that.
>
> Btw - Linux coding style: No space between __attribute__ and ((packed)).
>
> > +#include <asm/reboot.h>
>
> You get a false warning from checkpatch.pl here.  Which probably means
> either we should teach checkpatch.pl to check if <linux/reboot.h> is
> actually including <asm/reboot.h> or rename <asm/reboot.h> to something
> which would also help to avoid confusion.

<linux/reboot.h> is not including <asm/reboot.h> so renaming <asm/reboot.h> 
sounds like a good solution.

>
> > +++ b/arch/mips/include/asm/mach-ar7/spaces.h
>
> You can cut down this header file to something like:
>
> /* Copyright blurb */
> #ifndef _ASM_AR7_SPACES_H
> #define _ASM_AR7_SPACES_H
>
> /*
>  * This handles the memory map.
>  * We handle pages at KSEG0 for kernels with 32 bit address space.
>  */
> #define PAGE_OFFSET		0x94000000UL
> #define PHYS_OFFSET		0x14000000UL
>
> #include <asm/mach-generic/spaces.h>

Fixed, thanks !
-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

      reply	other threads:[~2009-06-04  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 12:02 [PATCH 08/10] add TI AR7 support Florian Fainelli
2009-06-02 12:51 ` Ralf Baechle
2009-06-04  9:22   ` Florian Fainelli [this message]

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=200906041122.14063.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=ralf@linux-mips.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.