[PATCH/RFC] powerpc: Add Efika platform support
Nicolas DET
nd at bplan-gmbh.de
Fri Nov 3 07:52:16 EST 2006
Benjamin Herrenschmidt wrote:
> On Thu, 2006-11-02 at 09:19 +1100, Benjamin Herrenschmidt wrote:
>> On Wed, 2006-11-01 at 21:29 +0100, Nicolas DET wrote:
>
> Ooops ... here's the english version :)
>
>>> +
>>> +static void __init efika_init_IRQ(void)
>>> +{
>>> + mpc52xx_init_irq();
>>> +}
>> Ya pas moyen que mpc52xx_init_irq() ait le bon prototype pour que tu le
>> colle directement dans ppc_md. ?
>
> It would be better if mpc52xx_init_irq() had the right prototype so it
> can be hooked directly from ppc_md.
Well. there was other init done here before. However, I think it's good
to have this here, in case more code would be needed or in the
ppc_md.init_IRQ is changed. no ?
>>> +
>>> + ISA_DMA_THRESHOLD = ~0L;
>>> + DMA_MODE_READ = 0x44;
>>> + DMA_MODE_WRITE = 0x48;
>> Ca viens de CHRP ca ? Je suis pas sur que ca soit super utile... mais
>> bon, ca mange pas de pain.. Au cas ou qqun colle un southbridge ISA sur
>> le bus PCI :)
>
Well. It it doesn't hurt it can stay here. People are a little bit weird
today. Maybe they would try to solder a PCI southbridige to get a nice
PC speaker beep ;-)
> This comes from CHRP ? I'm not sure it's terribly useful, at least for
> Efika, though it doesn't hurt. Maybe some day somebody will stick an ISA
> southbridge on the 5200 PCI bus :)
>
>>> +void __init efika_pcisetup(void)
>>> +{
>>> + const int *bus_range;
>>> + int len;
>>> + struct pci_controller *hose;
>>> + struct device_node *root;
>>> + struct device_node *pcictrl;
>>> +
>>> + root = of_find_node_by_path("/");
>>> + if (root == NULL) {
>>> + printk(KERN_WARNING EFIKA_PLATFORM_NAME
>>> + ": Unable to find the root node\n");
>>> + return;
>>> + }
>>> +
>>> + for (pcictrl = NULL;;) {
>>> + pcictrl = of_get_next_child(root, pcictrl);
>>> + if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
>>> + break;
>>> + }
>>> +
>>> + if (pcictrl == NULL) {
>>> + printk(KERN_WARNING EFIKA_PLATFORM_NAME
>>> + ": Unable to find the PCI bridge node\n");
>>> + return;
>>> + }
>>> +
>>> + of_node_put(pcictrl);
>>> + of_node_put(root);
>> Euh... non... tu fait pas of_node_put(pcictrl) avant de t'en servir...
>> tu fait ca quand tu as fini. Ca veut dire probablement changer test
>> "return" en "goto bail;" ou un truc du genre.
>
> Don't do an of_node_put(pcictrl) before you use that node... Do it when
> you are done with it, which probably means changing "return" statements
> into something like "goto bail;"
>
I hope I did it right.
>>> + if (bus_range[1] == bus_range[0])
>>> + printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
>>> + bus_range[0]);
>>> + else
>>> + printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
>>> + bus_range[0], bus_range[1]);
>>> + printk(" controlled by %s", pcictrl->full_name);
>>> + printk("\n");
>> You really need the above printk's ?
>
> Ah, that one was good :)
>
>> hose->arch_data = of_node_get(pcictrl);
>>
Ok
>>> + hose->first_busno = bus_range[0];
>>> + hose->last_busno = bus_range[1];
>>> + hose->ops = &rtas_pci_ops;
>>> +
>>> + pci_process_bridge_OF_ranges(hose, pcictrl, 0);
>>> +}
>> Le reste est bon.
>>
>> On y est presque ! :)
>
> The rest is good, we're almost there :)
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: archpowerpc_efika.patch
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061102/59ca758f/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nd.vcf
Type: text/x-vcard
Size: 249 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061102/59ca758f/attachment.vcf>
More information about the Linuxppc-dev
mailing list