Re: [Ocf-linux-users] Marvell CESA: platform_data
Brought to you by:
david-m
|
From: <ana...@wi...> - 2011-11-22 05:55:18
|
Thanks for the reply.
orion_crypto_init() has no code to initialize platform_data in orion_crypto device. I would think it should be done one of the ways as follows (as examples).
static struct platform_device orion_ge11_shared = {
.name = MV643XX_ETH_SHARED_NAME,
.id = 1,
.dev = {
.platform_data = &orion_ge11_shared_data,
},
};
OR
void __init orion_ge00_switch_init(struct dsa_platform_data *d, int irq)
{
int i;
if (irq != NO_IRQ) {
orion_switch_resources[0].start = irq;
orion_switch_resources[0].end = irq;
orion_switch_device.num_resources = 1;
}
d->netdev = &orion_ge00.dev;
for (i = 0; i < d->nr_chips; i++)
d->chip[i].mii_bus = &orion_ge00_shared.dev;
orion_switch_device.dev.platform_data = d;
platform_device_register(&orion_switch_device);
}
The same is not done for crypto device. Or am I missing something?
Regards
Ananth
From: 张绪峰 [mailto:sea...@12...]
Sent: Tuesday, November 22, 2011 10:39 AM
To: Anantharam V (WT01 - GMT-Telecom Equipment)
Cc: ocf...@li...
Subject: Re:[Ocf-linux-users] Marvell CESA: platform_data
At 2011-11-18 22:22:14,ana...@wi... wrote:
>Hi,
>
>In OCF-linux file cesa_ocf_drv.c, there is the following code in
>function mv_cesa_ocf_init() line 1179.
>
> cesa_device.plat_data = pdev->dev.platform_data;
>
>I was not able to find where platform_data was set. I suppose it
>should've been done in Linux architecture files (specifically one of the
>files in /arch/arm/mach-kirkwood), probably where kirkwood_crypto_device
>is defined.
>
>But I could not find it in code for kernel 2.6.31.8. In later version,
>i.e 3.1.1, this has been changed to refer orion_crypto structures.
>Again, can't find where platform_data is set for CESA.
This should be the platform_data register for CESA in 3.1.1:
plat-orion/common.c +945:
void __init orion_crypto_init(unsigned long mapbase,
unsigned long srambase,
unsigned long sram_size,
unsigned long irq)
{
fill_resources(&orion_crypto, orion_crypto_resources,
mapbase, 0xffff, irq);
orion_crypto.num_resources = 3;
orion_crypto_resources[2].start = srambase;
orion_crypto_resources[2].end = srambase + sram_size - 1;
platform_device_register(&orion_crypto);
}
Best Regards,
Xufeng Zhang
>
>Could you please help me understand?
>
>Regards
>Ananth
>
>------------------------------------------------------------------------------
>All the data continuously generated in your IT infrastructure
>contains a definitive record of customers, application performance,
>security threats, fraudulent activity, and more. Splunk takes this
>data and makes sense of it. IT sense. And common sense.
>http://p.sf.net/sfu/splunk-novd2d
>_______________________________________________
>Ocf-linux-users mailing list
>Ocf...@li...
>https://lists.sourceforge.net/lists/listinfo/ocf-linux-users
|