All of lore.kernel.org
 help / color / mirror / Atom feed
From: benjamin.zores@alcatel-lucent.com (Benjamin Zores)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3 v4] [ARM] Kirkwood: add support for PCIe1
Date: Tue, 08 Jun 2010 14:43:24 +0200	[thread overview]
Message-ID: <4C0E3AEC.8040304@alcatel-lucent.com> (raw)
In-Reply-To: <AANLkTilq6R6_9aEBZ66mSnMe5GsOLYDqP4qbQQHJsb8b@mail.gmail.com>

On 08/06/2010 14:20, saeed bishara wrote:
> On Tue, Jun 8, 2010 at 2:43 PM, Benjamin Zores
> <benjamin.zores@alcatel-lucent.com>  wrote:
>    
>> On 08/06/2010 13:21, Saeed Bishara wrote:
>>      
>>> @@ -106,17 +108,21 @@ void __init kirkwood_setup_cpu_mbus(void)
>>>                       TARGET_PCIE, ATTR_PCIE_IO,
>>> KIRKWOOD_PCIE_IO_BUS_BASE);
>>>         setup_cpu_win(1, KIRKWOOD_PCIE_MEM_PHYS_BASE,
>>> KIRKWOOD_PCIE_MEM_SIZE,
>>>                       TARGET_PCIE, ATTR_PCIE_MEM,
>>> KIRKWOOD_PCIE_MEM_BUS_BASE);
>>> +       setup_cpu_win(2, KIRKWOOD_PCIE1_IO_PHYS_BASE,
>>> KIRKWOOD_PCIE1_IO_SIZE,
>>> +                     TARGET_PCIE, ATTR_PCIE1_IO,
>>> KIRKWOOD_PCIE1_IO_BUS_BASE);
>>> +       setup_cpu_win(3, KIRKWOOD_PCIE1_MEM_PHYS_BASE,
>>> KIRKWOOD_PCIE1_MEM_SIZE,
>>> +                     TARGET_PCIE, ATTR_PCIE1_MEM,
>>> KIRKWOOD_PCIE1_MEM_BUS_BASE);
>>>
>>>
>>>        
>> I'd have used an id, and incremented it at each setup_cpu_win() call.
>> Also only doing the last 2 calls on 6282.
>>
>>      
>>>         /* Make sure those units are accessible */
>>> -       writel(curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0,
>>> CLOCK_GATING_CTRL);
>>> +       writel(curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0 | CGC_PEX1,
>>> CLOCK_GATING_CTRL);
>>>
>>>
>>>        
>> Why not (pseudo code):
>>
>> int flags = curr | CGC_SATA0 | CGC_SATA1 | CGC_PEX0;
>> if (6282) flags |= CGC_PEX1;
>> writel(flags, ...);
>>
>>      
>>> +       /* For PCIe 1: first shutdown the phy */
>>> +       if (dev == MV88F6282_DEV_ID) {
>>> +               if (!(kirkwood_clk_ctrl&    CGC_PEX1)) {
>>> +                       writel(readl(PCIE1_LINK_CTRL) | 0x10,
>>> PCIE1_LINK_CTRL);
>>> +                       while (1)
>>> +                               if (readl(PCIE1_STATUS)&    0x1)
>>> +                                       break;
>>> +                       writel(readl(PCIE1_LINK_CTRL)&    ~0x10,
>>> PCIE1_LINK_CTRL);
>>> +               }
>>> +       } else  /* keep this bit set for devices that don't have PCIe1 */
>>> +               kirkwood_clk_ctrl |= CGC_PEX1;
>>>
>>>
>>>        
>> the else part is useless with the proposal above i guess.
>>
>> Except from that, when using your patch I was unable to boot kernel anymore
>> on 6281 boards.
>>      
> can you try the patch I send regarding nand mpps?
>    

Unfortunately no, I'm running on OpenRD currently.

Ben

  reply	other threads:[~2010-06-08 12:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 15:09 [PATCH 1/3] [ARM] Kirkwood: add support for rev A1 of the 88f6192 and 88f6180 chips Saeed Bishara
2010-06-01 15:09 ` [PATCH 2/3] [ARM] Kirkwood: Add support for 88f6282 Saeed Bishara
2010-06-01 15:09   ` [PATCH 3/3] [ARM] Kirkwood: add support for PCIe1 Saeed Bishara
2010-06-01 19:55     ` Nicolas Pitre
2010-06-02 10:34       ` saeed bishara
2010-06-02 19:29         ` Nicolas Pitre
2010-06-03 11:43       ` saeed bishara
2010-06-03 16:30         ` Nicolas Pitre
2010-06-06 10:24           ` [PATCH 3/3 v3] " Saeed Bishara
2010-06-07  8:04             ` Benjamin Zores
2010-06-08 11:20               ` saeed bishara
2010-06-08 11:21                 ` [PATCH 3/3 v4] " Saeed Bishara
2010-06-08 11:43                   ` Benjamin Zores
2010-06-08 12:20                     ` saeed bishara
2010-06-08 12:43                       ` Benjamin Zores [this message]
2010-06-08 12:49                         ` saeed bishara

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=4C0E3AEC.8040304@alcatel-lucent.com \
    --to=benjamin.zores@alcatel-lucent.com \
    --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 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.